Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Fill dataset of sub-reports in VB.NET Post Reply Post New Topic
Author Message
EddiRae
Newbie
Newbie


Joined: 29 Aug 2008
Online Status: Offline
Posts: 30
Quote EddiRae Replybullet Topic: Fill dataset of sub-reports in VB.NET
    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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.