How to Duplicate the Page in C# Code - Reg.

Stimulsoft Ultimate discussion
shan
Posts: 51
Joined: Mon Nov 05, 2012 10:16 am

How to Duplicate the Page in C# Code - Reg.

Post by shan »

Hi,
How to duplicate the page the through C# Code ?
Example :
Report has page1 with some design, i want to duplicate the same page page2 and then to take render result.

Regards,
Shan
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to Duplicate the Page in C# Code - Reg.

Post by HighAley »

Hello, Shan.
shan wrote:Report has page1 with some design, i want to duplicate the same page page2 and then to take render result.
You could do this with next code:

Code: Select all

report.Pages.Add(report.Pages[0].Clone() as StiPage);
Thank you.
shan
Posts: 51
Joined: Mon Nov 05, 2012 10:16 am

Re: How to Duplicate the Page in C# Code - Reg.

Post by shan »

Hi,
Thanks for your response, its working fine.
i tried to add 113 pages using clone option in the same report. when i rendered the report it shows stack overflow exception unhandled. So kindly suggest us some alternative option to overcome.

Thanks & Regards,
Shan.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to Duplicate the Page in C# Code - Reg.

Post by HighAley »

Hello.

Could you decribe your issue more detailed?
Why do you create so much pages?

Thank you.
shan
Posts: 51
Joined: Mon Nov 05, 2012 10:16 am

Re: How to Duplicate the Page in C# Code - Reg.

Post by shan »

Hi,
As we already discussed i have single page in the template, i want to duplicate the same page because there will be only slight change in the design and i will change the filter parameters. For this purpose only i am duplicating the pages which was working fine for 100 pages if i increase the page then during rendering it shows message stack overflow exception unhandled.
Also note that pages duplication will work dynamically depends on data's that we are sending. So i also need whether this process is feasible or not.
Kindly look into the above mentioned detail and then suggest us some alternative if possible.

Thanks & Regards,
Shan.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to Duplicate the Page in C# Code - Reg.

Post by HighAley »

Hello, Shan.

Maybe it's better to create different reports but not all page in one report template?
What kind of changes do you need to do on different pages?
Could you send us a sample project which reproduces the issue?

Thank you.
shan
Posts: 51
Joined: Mon Nov 05, 2012 10:16 am

Re: How to Duplicate the Page in C# Code - Reg.

Post by shan »

Hi,
Is it possible to render more than One Report.mrt File in StiWebViewer i.e.i need to take the PDF output's of all the seperate report files as Single that is why in my report i am duplicating the page and rendering it single time to print 110 pages as single PDF.
In duplicating process i will just change the filter condition values to produce the different result.

Thanks & Regards,
Shan
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to Duplicate the Page in C# Code - Reg.

Post by HighAley »

Hello, Shan.
shan wrote: Is it possible to render more than One Report.mrt File in StiWebViewer i.e.i need to take the PDF output's of all the seperate report files as Single that is why in my report i am duplicating the page and rendering it single time to print 110 pages as single PDF.
In duplicating process i will just change the filter condition values to produce the different result.
It will be easier to join all reports in one. Or do you need to have different reports?
Could you send us your report template for analysis?

Thank you.
shan
Posts: 51
Joined: Mon Nov 05, 2012 10:16 am

Re: How to Duplicate the Page in C# Code - Reg.

Post by shan »

Hi,
Thanks for your response.

Can u please send any sample to join all the reports as one and convert it to single PDF. It will be more helpful for me.

Thanks & Regards,
Shan
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to Duplicate the Page in C# Code - Reg.

Post by HighAley »

Hello, Shan.
shan wrote:Can u please send any sample to join all the reports as one and convert it to single PDF. It will be more helpful for me.
We need to see your data structure and report do give you exact answer.
Meanwhile we could show you some videos how to create master-detailed report. http://www.stimulsoft.com/en/videos?tags=masterdetail

Thank you.
Post Reply