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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreports in Crystal Reports

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
hello,

I have a solution where I've added a project which contains my reports. My reports are based on a ADO.NET dataset. This all works fine.
The problems I am facing now are subreports. How can I add a dataset to the subreport at runtime?

for my "simple" reports, I use following method:

Dim myReport As New ReportDocument()

myReport = New xsdreport() ' is the name of my report in that project

myReport.SetDataSource(x) ' x is my dataset

CrystalReportViewer1.ReportSource = myReport

this works all fine, but how can I now add the dataset to a subreport?

can someone help me with this problem?

Thanks
Björn
 
Bjorn,

I am wondering if you had found a solution to this problem. I am experiencing the same problem now and would appreciate any help that you could throw my way...

Regards,

Steve
 
hi,
Try this out.

Dim subrpt1 As CrystalDecisions.CrystalReports.Engine.ReportDocument

subrpt1 = myRpt.OpenSubreport("YourSubReportName") '****name is case sensitive
subrpt1.SetDataSource(myDS)

''*** where myRpt is the main report
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top