|
-
Feb 7th, 2012, 12:47 PM
#1
Thread Starter
Member
VB2008 and Crystal Reports
I have a dataset, in that dataset I have a query:
SELECT ID, Name, Price
FROM tblItems
WHERE (ID = @Param1)
I design the report already using the said dataset. I'm trying to generate the report, but i got an error message that the source of the report is invalid. Here is my code on my btnGenerateReport.
Dim cryRpt As New ReportDocument
cryRpt.Load("location of my.rptfile")
Dim DA As New DataSet1TableAdapters.tblTransactionDetailsTableAdapter
Dim DS As New DataSet1.tblTransactionDetailsDataTable
ReportViewer.CrystalReportViewer1.ReportSource = DA.Fill(DS, txtID.Text)
ReportViewer.CrystalReportViewer1.Refresh()
ReportViewer.Show()
What's wrong with my codes? Please help me. Thanks
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
|