cancel
Showing results for 
Search instead for 
Did you mean: 

How to show view tab Main Report and all of Sub Report in one action through Visual FoxPro

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

robert_horne
Employee
Employee
0 Kudos

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

http://diamond.businessobjects.com/robhorne</a>;

Answers (0)