After rendering of the report you may reorder pages on your taste.
The following code in the Event handler Report.EndRenderEvent allows to change the order of the 3(!) rendered pages to the inverse order.
Code: Select all
this.RenderedPages.Add(this.RenderedPages[1].Clone() as StiPage);
this.RenderedPages.Add(this.RenderedPages[0].Clone() as StiPage);
this.RenderedPages.RemoveAt(0);
this.RenderedPages.RemoveAt(0);
The following code in the EndRenderEvent allows to achive the order you are requested (you have Page1 and Page2 in template. Every page produces 2 rendered pages):
Code: Select all
this.RenderedPages.Add(this.RenderedPages[2].Clone() as StiPage);
this.RenderedPages.Add(this.RenderedPages[1].Clone() as StiPage);
this.RenderedPages.Add(this.RenderedPages[3].Clone() as StiPage);
this.RenderedPages.RemoveAt(1);
this.RenderedPages.RemoveAt(1);
this.RenderedPages.RemoveAt(1);
Result is the following:
Page1(1)
Page2(1)
Page1(2)
Page2(2)
Also may be possible the following technic:
You may also clone a template of the Reports Page. In the BeginRenderEvent event of the Report object in the Events Tab of the report Property Editor you should place the following code:
Code: Select all
this.Pages.Add(this.Pages[0].Clone() as StiPage);
Result will be the following:
Page1(1)
Page1(2)
Page2(1)
Page2(2)
Page1(3)
Page1(4)
Thank you.