Fill dataset of sub-reports in VB.NET
Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21034
Printed Date: 02 May 2024 at 9:57am
Topic: Fill dataset of sub-reports in VB.NET
Posted By: EddiRae
Subject: Fill dataset of sub-reports in VB.NET
Date Posted: 16 Sep 2014 at 3:34pm
Hello, I have three reports that are all using different datasets. My user wants to be able to print/view all three reports at once.
I have the following code, but when it gets to the Detail report and tries to set the datasource, it seems to open the crystal report before I am ready. What am I missing?
objRpt = New rptCOMBO objRpt.SummaryInfo.ReportComments = Mid(sDetailRpt, 1, 1) & Mid(sOverviewRpt, 1, 1) & Mid(sENLRpt, 1, 1)
If sDetailRpt = "TRUE" Then objRpt.Subreports("srDetail").SetDataSource(dsDetail) objRpt.Subreports("srDetail").SummaryInfo.ReportTitle = "Detail Report" & strReportHeader & vbCrLf & strContactPhone End If If sOverviewRpt = "TRUE" Then objRpt.Subreports("srOverview").SetDataSource(dsOverview) objRpt.Subreports("srOverview").SummaryInfo.ReportTitle = "Overview Report" & strReportHeader & vbCrLf & strContactPhone End If If sENLRpt = "TRUE" Then objRpt.Subreports("srENL").SetDataSource(dsHistory) objRpt.Subreports("srENL").SummaryInfo.ReportTitle = strReportHeader & vbCrLf & strContactPhone End If
Thanks for your help in advance! Eddi Rae
|
|