Page 1 of 1

Load/Render/View Multiple Pages based on condition

Posted: Mon Feb 17, 2014 5:34 am
by kpmsak
Team,

I have a report (.MRT file), which has multiple pages like "Summary", "Details" if do the preview it's working fine. Is there way to preview or render only "Summary" or "Details" condition based.

Thanks,
Kpmsak

Re: Load/Render/View Multiple Pages based on condition

Posted: Mon Feb 17, 2014 5:55 am
by Alex K.
Hello,

Please try to add the Conditions for "Summary" and "Details" pages. You can use the aditional variable in Conditions and "Component Is Enabled" option.

Thank you.

Re: Load/Render/View Multiple Pages based on condition

Posted: Mon Feb 17, 2014 6:59 am
by kpmsak
Thanks Aleksey for swift reply.

I couldn't find the "Component Is Enabled" condition. I belive i have missed some thing. could you please share the sample code.

Stimulsoft.Report.Components.StiPagesCollection stiPagescoll = report.Pages;
Stimulsoft.Report.Components.StiPage sti_page = new Stimulsoft.Report.Components.StiPage();
//int ww = report.pages;

DataSet ds = this.GetData();
ds.Tables[0].TableName = "RecapTestData";

if (stiPagescoll[0].Name == "Summary")
{
sti_page = stiPagescoll[1].Page;

}

Re: Load/Render/View Multiple Pages based on condition

Posted: Mon Feb 17, 2014 7:28 am
by kpmsak
Aleksey,

Thanks I have changed my code like this and now my problem is solved.

report.Pages[1].Enabled=false

kpmsak.

Re: Load/Render/View Multiple Pages based on condition

Posted: Mon Feb 17, 2014 7:30 am
by Alex K.
Hello,

Ok.
Let us know if you need any additional help.