In Stimulsoft Reports 2014.2 will be improved the component Sub-report.

The content of the sub-report can be placed on a separate page of the main report or in the external report. In earlier versions the user could connect the external report only from the code of a user application. For this you should set the sub-report property Use The External Report to true and, in the user code, subscribe on the event GetSubReport, in which the needed external report will be loaded. See an example of such code:

.....
StiReport rep = newStiReport();
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();
    if (e.SubReportName == "your_subreport_component_1") rep.LoadFromUrl(@"D:\SubReport1.mrt");
    if (e.SubReportName == "your_subreport_component_2") rep.LoadFromUrl(@"D:\SubReport2.mrt");
    e.Report = rep;
}

So you could get the external sub-report only from the code and it was very difficult.

Our developers updated this component to make the work with this more easy and convenient. Now, in addition to the previous methods, you can explicitly specify the path to the external account - as a path to a file or URL. To make it easier, these properties are now placed in a separate editor which is run if you double-click the component or directly from the properties panel. The designer has following tabs:
Page. Select one of the report pages which will be used as a sub-report (old property SubReportPage);
File. In this tab you can specify the path to the required file;
URL. In this tab can you specify the URL (universal path) to the required file, for example, from the website;
Parameters. In this tab can you specify the parameters that you can pass to the sub-report. This function looks similar with the function of the Drill-Down Report. It allows to flexibly controlling sub-reports. For example, you can use one sub-report to display a filtered list several times, just by passing into it the different filter values as parameters.

sub-report-editor
By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.