|
-
Aug 23rd, 2007, 01:22 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] From DataReport to Crystal Reports
good day everyone.
i've recently moved from VB6 to VB.NET. i have this application and it uses Crystal Reports for reporting. I have a control under the "Header" section and i want to set its value/text at run time. in VB6's datareport, i could just use the code below:
Code:
DataReport1.Sections(n).Controls(x).caption = "This is a test"
How can i do this when using crystal reports? i have search the forum but i couldn't get the right solution. any help would be greatly appreciated.
thanks.
-
Aug 24th, 2007, 02:21 AM
#2
Thread Starter
Hyperactive Member
Re: [2005] From DataReport to Crystal Reports
never mind. i already found the solution.
-
Aug 24th, 2007, 09:41 AM
#3
Re: [2005] From DataReport to Crystal Reports
Moved to Reporting
Post your solution as it might help others.
-
Aug 28th, 2007, 01:18 AM
#4
Thread Starter
Hyperactive Member
Re: [2005] From DataReport to Crystal Reports
okay, here's how i did it.
Code:
Dim txtTemp As CrystalDecisions.CrystalReports.Engine.TextObject
Dim xReceipt As New crReceipt
With xReceipt
txtTemp = .Section1.ReportObjects("txtTitle")
txtTemp.Text = "This is a test."
End With
The crReceipt object is a crystal report document i made. under Section1 of the report, i have a TextObject named "txtTitle". using the code above, you can programmatically set the Text property of the TextObject before showing the report in the report viewer.
Hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|