Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing a value on a report from my code.
Message
 
To
15/07/2004 14:47:53
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Reporting
Miscellaneous
Thread ID:
00924854
Message ID:
00924912
Views:
20
This message has been marked as the solution to the initial question of the thread.
Mike,

I have done this in C#, but not in VB so forgive me if the syntax is wrong. I think what you want to do is something like this:

Dim myReport As New CrystalReport1()
Dim myText As CrystalDecisions.CrystalReports.Engine.TextObject
myText = CType(myReport.ReportDefinition.ReportObjects.Item("HeaderText"),CrystalDecisions.Engine.TextObject)
myText.Text = "Mike"

This sample is taken from a great book on Crystal Reports for .Net that I highly recommend. It is full of very useful sample code! You can find it at www.CrytalReportsBook.com.

Kind Regards,

Mat


>Hello,
>I have a crystal report that I am opening in vb.net. I have a textbox on the report in which I want to manipulate before I even open the report. How can I do this?
>
>I was told to use something like:
>
>ReportName.ReportDefinition.Sections(3).ReportObjects.Item("textboxname") = "Mike"
>
>but I get an error saying that the Item property is read only... any suggestions?
>
>
>MAC
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform