Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two DataSets, One Report and One Subreport - Using Report Viewer

Status
Not open for further replies.

qberta01

Programmer
Nov 14, 2005
113
Hello,

I have an app written in VS 2005 using VB. It creates two datasets. One dataset populates the main crystal report and the other populates the main report's subreport. I have read everything there is about how to get this to work, but it doesn't. My subreport comes up empty - it doesn't load.

This is the code I have been using:

Dim da_detail As New DataSet
Dim da_billing As New DataSet

....call code to fill datasets

Dim CRYRpt1 As New CryReport

CRYRpt1.SetDataSource(da_billing.Tables(0))
CRYRpt1.Subreports("CrySubreport.rpt").SetDataSource(da_detail.Tables(0))

CoxReportViewer.ReportSource = CRYRpt1

----------------------------------------------

The main report populates just fine, but no the subreport.

If anyone can help I would be oh so happy!

Thx,

Q.
 
Check Report > Formulas > Record in the subreport to see what selection criteria it is using. When you make a link from the main report it will automatically post a test, without bothering to ask if this is what you want.

Failing that, try exporting the subreport as a stand-alone and see if it works on its own. You can do that as a special File option within the subreport.

I don't know VB, but since no one else has answered, these are the points I do know about.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top