My application allows the user to enter Invoice Info into an SQL database.
When the user starts the app. the dataset Invoice_DS is loaded with all pertinent info about current Invoices.
at any given time there are about 200 - 300 invoices in this dataset. The dataset is also made up of 7 tables.
Header, Details, and supporting tables.
When the user is finished entering the data she needs to print a copy of the invoice.
I have tried to print using the Invoice_DS dataset just to see if I am getting some data out. I realize there are a few hundred records there and I eventually only want to print the Invoice that the user is currently viewing.
I tried using the following code to print using a Dataset. But I only get a blank layout of the Invoice Printout.
Code Snippet
Dim
crReportDocument As InvPRT2
crReportDocument =
New InvPRT2()
crReportDocument.SetDataSource(Invoice_DS)
''Set the viewer to the report object to be previewed.
CrystalReportViewer1.ReportSource = crReportDocument
CrystalReportViewer1.PrintReport()
I don't want to have the report Query the db each time because that seems like a huge waste of resources. I already have the data in hand. Can anyone tell me of the correct approach to this ?
Thanks
tattoo