Page 1 of 1
Report in report
Posted: Wed Jun 13, 2012 11:42 pm
by LeMinhChau
hi everyone!
I have 2 file report mrt.
I user a header file for all the report so I do want to be drag in to the header for each report. how do it?
ex:
report1.mrt the report header
I want to use this report for report2.mrt header.
Thank you very much!
Report in report
Posted: Fri Jun 15, 2012 5:18 am
by Alex K.
Hello,
Please try to use the Sub-Report component with property UseExternalReport.
Thank you.
Report in report
Posted: Fri Jun 15, 2012 10:26 pm
by LeMinhChau
Hi Aleksey!
Please, can you get me an example it?
Thankyou very much!
Report in report
Posted: Fri Jun 22, 2012 9:23 am
by Alex K.
Hello,
You can add the Sub-Report in Header section in your reports, set the UseExternalReport property to true and use the following code for load SubReport:
Code: Select all
.....
StiReport rep = new StiReport();
rep.LoadFromUrl(@"D:\MainReport.mrt");
rep.GetSubReport += new StiGetSubReportEventHandler(rep_GetSubReport);
rep.Render();
rep.Show();
.....
void rep_GetSubReport(object sender, StiGetSubReportEventArgs e)
{
StiReport rep = new StiReport();
rep.LoadFromUrl(@"D:\SubReport.mrt");
e.Report = rep;
}
Thank you.