Merging pages
Posted: Mon Apr 20, 2009 1:27 am
Hi there,
i try to merge the pages of one report with the pages of another report. the elements of the pages from the second report should be placed on the pages of the first report.
up to now i use a loop that cycles through the pages of the second report and within this loop i cycle through the components of the page and add them to the same page in the first report.
8
But this has some disadvantages since i have also to merge the used assemblies and the datasources. is there a simplier way to accomplish this task?
thanks in advance
andi
i try to merge the pages of one report with the pages of another report. the elements of the pages from the second report should be placed on the pages of the first report.
up to now i use a loop that cycles through the pages of the second report and within this loop i cycle through the components of the page and add them to the same page in the first report.
8
Code: Select all
int idx = 0;
foreach (StiPage page in rep2.Pages)
{
if (rep1.Pages.Count < idx)
_rep1.Pages.Add(new StiPage());
foreach (StiComponent item in page.Components)
{
item.Name += string.Format("_{0}_{1}", idx, rep1.Pages[idx].Components.Count);
rep1.Pages[idx].Components.Insert(0, item);
}
idx++;
}
thanks in advance
andi