Change page for a sub report
Posted: Fri Jul 08, 2022 11:36 am
Hello,
I am wondering if there is a way to change the page that appears in a sub-report component.
I have a sample report attached that has 3 pages:
- a main page with a sub-report component
- page subReport_1 for the sub-report contents
- page subReport_2 for alternate sub-report components
The report also has a picklist with the following values: Page 1 and Page 2.
If a user chooses Page 1 from the list, I would like Page subReport_1 to be displayed in the sub-report control.
If a user chooses Page 2 from the list, I would like Page subReport_2 to be displayed in the sub-report control.
I've tried adding the following code to the BeginRender event of the report, but I don't have the syntax right
for setting the sub-report page
if (varPage == "Page 1")
{
SubReport1.subReportPage = subReport_1;
}
else
{
SubReport1.subReportPage = subReport_2;
}
Can you provide some guidance on how this might be acccomplished - if it even can be accomplished?
Note that there are no data sources in the report, as I am just interested in figuring out the functionality if possible.
I'm currently working with Version 2021.1.1 from 15 January 2021, ASP.NET, JS
Thank you,
Carl
I am wondering if there is a way to change the page that appears in a sub-report component.
I have a sample report attached that has 3 pages:
- a main page with a sub-report component
- page subReport_1 for the sub-report contents
- page subReport_2 for alternate sub-report components
The report also has a picklist with the following values: Page 1 and Page 2.
If a user chooses Page 1 from the list, I would like Page subReport_1 to be displayed in the sub-report control.
If a user chooses Page 2 from the list, I would like Page subReport_2 to be displayed in the sub-report control.
I've tried adding the following code to the BeginRender event of the report, but I don't have the syntax right
for setting the sub-report page
if (varPage == "Page 1")
{
SubReport1.subReportPage = subReport_1;
}
else
{
SubReport1.subReportPage = subReport_2;
}
Can you provide some guidance on how this might be acccomplished - if it even can be accomplished?
Note that there are no data sources in the report, as I am just interested in figuring out the functionality if possible.
I'm currently working with Version 2021.1.1 from 15 January 2021, ASP.NET, JS
Thank you,
Carl