Page 2 of 2

Duplicating a page that appears many times in a report

Posted: Thu Feb 08, 2007 7:30 am
by Edward
Joel wrote:I created similar page to what you described, just without Databand1. unfortunately, I see the text only on page 1 and not on page2. What am I getting wrong ?
All your steps was correct. The only modification I've made to the report is placing the Container in the Databand and setting the CountData=3 of its DataSource property. Also Page2 may be deleted.
Also was made modifications for the report:
Page.LargeHeightFactor=2;
Page.LargeHeight = true (for convenient designing)

Please use the following link to download the ready report: http://forum.stimulsoft.com/upload/Container.zip


Thank you.

Duplicating a page that appears many times in a report

Posted: Thu Feb 08, 2007 7:49 am
by Joel Swift
Many thanks for the fixed report. I understand now the meaning of the propery CountData. I also have another situtaion:

- I have a sequence of 2 pages, for example page 1 and page 2, which are different.
- I would like to create page 3 and page 4, so page 3 is like page 1(same controls, but different data, as the case above), and similarily page 4 is like page 2, so I get the sequence:
page1
page2
page3 (like page1)
page4 (like page2)

How can I do that?


Duplicating a page that appears many times in a report

Posted: Thu Feb 08, 2007 10:56 am
by Edward
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.