Friday, January 18, 2013 8:49 AM
I am writing a code in custom code to access the sql data.
Function westsubsum() As decimal
Dim conn As New System.Data.SqlClient.SqlConnection ("Data Source=asharaf;Initial Catalog=test;Integrated Security=true")
Dim Cmd As New System.Data.SqlClient.SqlCommand
Cmd.Connection = conn
Cmd.CommandText = "select dbo.calculatesumwithdate(1000000,2000000,'12/31/2008')"
Dim totval As Decimal = Cmd.ExecuteScalar()
i calles in expression as =code.westsubsum
i m getting #error in my expression
when i run this in reporting server
i am getting this error
Cannot find either column "dbo" or the user-defined function
Friday, January 18, 2013 9:47 AM
Please check that the functon exists in the database or not.
and take a look on the same thread:
For User-defined function:
Regards Avanish T
- Edited by Avanish Tomar Friday, January 18, 2013 9:47 AM
Friday, January 18, 2013 10:12 AM
The function exist.
FUNCTION [dbo].[calculatesumwithdate](@range1 int,@range2 int,@enddate date)
DECLARE @subtotal decimal(18,2)
select @subtotal=sum(Amount) from dbo.[COMMERCIAL SECTOR$G_L Entry] where "Posting Date" <= @enddate and "G_L Account No_" between @range1 and @range2
Friday, January 18, 2013 10:39 AMAny help?
Friday, January 18, 2013 1:38 PM
i did this also
but it stillshow the #error when i am putting the try and catch the field shows zero.
i tried my maximum....
I am going to giveup :(
- Edited by Asharaf P Friday, January 18, 2013 1:40 PM