-
July 14th, 2010, 11:33 AM
#1
Populating a Crystal Report
I am having an issue with my report not getting populated. I have confirmed that the datatables are populated with the correct data, there are multiple datatables involved in creating this report. Below is the code I am using to populate the tables and create the report.
I pass each datatable to a Sub that make corrections to the datatable and then update it.
Code:
ds.dtCAFRreports.Clear()
Dim taICT As New dsCAFRreportsTableAdapters.dtIncContTranTableAdapter
taICT.Fill(ds.dtIncContTran, Me.cmbPeriodName.SelectedValue.ToString())
Dim taNORE As New dsCAFRreportsTableAdapters.dtNonOpRevExpTableAdapter
taNORE.Fill(ds.dtNonOpRevExp, Me.cmbPeriodName.SelectedValue.ToString())
Dim taOE As New dsCAFRreportsTableAdapters.dtOpExpTableAdapter
taOE.Fill(ds.dtOpExp, Me.cmbPeriodName.SelectedValue.ToString())
Dim taOR As New dsCAFRreportsTableAdapters.dtOpRevTableAdapter
taOR.Fill(ds.dtOpRev, Me.cmbPeriodName.SelectedValue.ToString())
'Edit (dtOpRev)
reviseTable(ds.dtOpRev)
ds.dtOpRev.AcceptChanges()
'Edit(dtOpExp)
reviseTable(ds.dtOpExp)
ds.dtOpExp.AcceptChanges()
'Edit(dtOpIncContTran)
reviseTable(ds.dtIncContTran)
ds.dtIncContTran.AcceptChanges()
'Edit dtNonOpRevExp
reviseTable(ds.dtNonOpRevExp)
ds.dtNonOpRevExp.AcceptChanges()
Dim rep As String = My.Settings.DetailReport
Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument
report.FileName = rep
report.SetDataSource(ds)
Me.crViewer.ReportSource = report
Me.Enabled = True
Me.crViewer.RefreshReport()
Me.Refresh()
Me.Cursor = Cursors.Default
Last edited by HanneSThEGreaT; July 16th, 2010 at 01:06 AM.
Reason: Added [CODE] tags.
-
July 16th, 2010, 01:07 AM
#2
Re: Populating a Crystal Report
Welcome to the forums dungbeetle!
Please make sure to post your code in [CODE] tags next time. It is explained here :
http://www.codeguru.com/forum/showthread.php?t=403073
-
July 16th, 2010, 02:13 AM
#3
Re: Populating a Crystal Report
Might want to post in the Crystal Reports forum
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
|