Page 1 of 1

Get Components of an existing report and add it into a new report

Posted: Tue Jun 26, 2018 1:49 am
by Liewai25
Can i achieve this? For instance i Have a report called reportA and reportA consist of one dataBand.

Can i take the databand out using GetComponents()["DataBand"] method and add it into a new generate report using page.Components.Add(DataBand) ? I try but fail when report generation? Is that possible.

StiDataBand d1 = reportA.GetComponents()["DataBand"] as StiDataBand;

StiReport reportTest = new StiReport();
StiPage page = reportTest.Pages[0];
page.Components.Add(d1);

Re: Get Components of an existing report and add it into a new report

Posted: Tue Jun 26, 2018 3:07 pm
by Liewai25
Anyone? Is that possible or No ? As i cant make it and always get exception.

Re: Get Components of an existing report and add it into a new report

Posted: Wed Jun 27, 2018 9:02 am
by Lech Kulikowski
Hello,

In this case, you should set datasource and other properties for band in second report.

Please send us a simple project which reproduces the issue for analysis.

Thank you.