Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 custom code help

Author  Topic 

gavakie
Posting Yak Master

221 Posts

Posted - 2009-10-21 : 18:37:27
I have this code

Public shared Function ChangeWord(ByVal s As String) As String
Dim strBuilder As New System.Text.StringBuilder(s)
If s.Contains("Sales") Then
strBuilder.Replace("Sales", "Other NOT INCL")
Return strBuilder.ToString()
Else : Return s
End If
End Function

Then this in my text box, when i run it i get

An error occurred during local report processing.
The definition of the report 'Main Report' is invalid.
The Value expression for the textbox ‘Mailed_1’ contains an error: [BC30451] Name 'ChangeWord' is not declared.

How can I fix this?

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-10-22 : 10:14:27
Exactly what is it you are trying to do?

I was not aware you could use code like that in a text box. Where are you puting that, in Value?

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

gavakie
Posting Yak Master

221 Posts

Posted - 2009-10-22 : 10:42:30
Well its not for the text box, that code is in the properties of the report I have been trying to figure this problem out for a week and its driving me nuts

I have Data like this

Column1 Column 2 Column 3 Column 4 Column 5
string1 #### #### #### ####
string2 #### #### #### ####
string3 #### #### #### ####
string4 #### #### #### ####
--------------------------------------------------
total total total total

I want all those totals to be a group of the column minus the numbers where the first column = String4
Go to Top of Page

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-10-22 : 11:14:14
Ah, never used that option before... I had something similar to what you are trying and I used an SQL statement to build each row and then used a union. Can you get at your hotmail account from where you are? Here they block all Yahoo, Hotmail, GMail, AOL, etc...


John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

gavakie
Posting Yak Master

221 Posts

Posted - 2009-10-27 : 09:40:53
Yeah I can get to it.
Go to Top of Page

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-10-27 : 09:50:05
I sent something with 3 attachments last Thursday. Sample SQL, Sample RDL and Sample Report Output...

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

gavakie
Posting Yak Master

221 Posts

Posted - 2009-10-27 : 10:01:10
hmmm i never saw it let me look again.
Go to Top of Page

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-10-27 : 10:03:41
I just resent

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page
   

- Advertisement -