on 06-19-2007 10:29 AM
How to show all view tab (Main Report and all of Sub Report) in one action.
I already know how to show Main Report with this code sample:
oRptRun=createobject("CrystalRuntime.Application")
oRptView=this.Parent.oleRptViewer
oRptOpen=oRptRun.OpenReport('MyReport.rpt')
oRptView.ReportSource=oRptOpen
oRptView.ViewReport
Inside the 'MyReport.rpt' it has 2 subreports:
1. MySubReport_1
2. MySubReport_2
I try to show MySubReport_1 and MySubReport_2 together with their own Main Report with this code sample:
oRptRun=createobject("CrystalRuntime.Application")
oRptView=this.Parent.oleRptViewer
oRptOpen=oRptRun.OpenReport('MyReport.rpt')
oRptSub1=oRptOpen.OpenSubreport('MySubReport_1')
oRptSub2=oRptOpen.OpenSubreport('MySubReport_2')
oRptView.ReportSource=oRptOpen
oRptView.ViewReport
Did I miss something because there was only view tab 'Preview' (Main Report) shown without view tab MySubReport_1 and MySubReport_2.
Thank you.
Your right, there is only one tab to view the report.
To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.