sparkyp
Programmer
- Aug 16, 2004
- 12
Hello,
We have a report with several sub-reports. We wish to re-use one of them three times within the report, displaying different data each time. We have each sub-report in it's own group on the main report, each with the formula 'whilereadingrecords; 1'.
When we insert the duplicate sub-reports, they get the names 'xxx.rpt - 01' and 'xxx.rpt - 02'.
It all seems fine, but when the report is generated, all three sub-reports show the same data - and appear to be the same report. They all show the data from the last sub-report (i.e. 'xxx.rpt - 02'). If we remove that one, they both show the data from report ' - 01'.
We are setting the data with code like this (C#):
We have parameters which display in the reports and these are appearing correctly.
Is it possible to do this in CR, or are we barking up the wrong tree?
We are using the version of CR 9 that comes with Visual Studio.
We are hoping to be upgrading to the Developer Edition soon.
Thanks for any help.
We have a report with several sub-reports. We wish to re-use one of them three times within the report, displaying different data each time. We have each sub-report in it's own group on the main report, each with the formula 'whilereadingrecords; 1'.
When we insert the duplicate sub-reports, they get the names 'xxx.rpt - 01' and 'xxx.rpt - 02'.
It all seems fine, but when the report is generated, all three sub-reports show the same data - and appear to be the same report. They all show the data from the last sub-report (i.e. 'xxx.rpt - 02'). If we remove that one, they both show the data from report ' - 01'.
We are setting the data with code like this (C#):
Code:
report.OpenSubreport("xxx.rpt").SetDataSource(myDataSet1);
report.OpenSubreport("xxx.rpt - 01").SetDataSource(myDataSet2);
report.OpenSubreport("xxx.rpt - 02").SetDataSource(myDataSet3);
We have parameters which display in the reports and these are appearing correctly.
Is it possible to do this in CR, or are we barking up the wrong tree?
We are using the version of CR 9 that comes with Visual Studio.
We are hoping to be upgrading to the Developer Edition soon.
Thanks for any help.