|
-
Jul 17th, 2003, 10:45 AM
#1
Thread Starter
New Member
Crystal Reports & VB.NET Problem (Blank Report in Viewer)
Hopefully someone can help me because I've looked everywhere and can't find any solutions that work. I'm using VB.NET and the Crystal Reports that comes with it. I started with a blank report and set it up with the designer. I do not want to make any database connections, as I am passing the data in from constants to an array of type CrystalDecisions.CrystalReports.Engine.TextObject that holds the strings. I then assign an index of the array to an instance of a textobject on the report and then set the text property equal to the string that is held in the array. I also have a form with a report viewer that is bound to the report. When I preview the report, the textobjects are empty although the array is populated (can view values in Locals). Here is an example of some of the code.
Dim TextObjects(38) As CrystalDecisions.CrystalReports.Engine.TextObject
Dim Report As New CrystalReport1()
Dim Viewer As New frmViewer()
With Report
With .Section2
TextObjects(0) = .ReportObjects.Item("txtROInfo")
TextObjects(0).Text = "RO#: " & InvRpt.RONo
TextObjects(1) = .ReportObjects.Item("txtCompanyInfo")
TextObjects(1).Text = InvRpt.TitleCompany
...and so on for the rest of the textobjects and sections on the report
End With
End With
Viewer.Show()
I can't understand why the text property of the textobjects isn't receiving (or displaying) the data. Thanks for any help/suggestions you can give me.
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
|