External subreport
Posted: Wed Jul 13, 2016 11:39 am
Hello,
I would like to create external subreport which will be reusable in many main reports.
Datasource is dataset with two tables - master and detail with one common column.
I have problem to set relationship between reports due to problem with setting Databand's MasterComponent in subreport.
Result is that detail datatable is not filtered by value set in relationship and always rendered all rows.
How can I do this?
Thank you for help,
mira
I would like to create external subreport which will be reusable in many main reports.
Datasource is dataset with two tables - master and detail with one common column.
I have problem to set relationship between reports due to problem with setting Databand's MasterComponent in subreport.
Code: Select all
void report_GetSubReport(object sender, StiGetSubReportEventArgs e)
{
StiReport subReport = new StiReport();
subReport.Load("subreport.mrt");
subReport.RegData("ds", _Dataset);
var data = (StiDataBand)subReport.GetComponentByName("Detail");
var parentC = parentReport.GetComponentByName("DataMain");
data.MasterComponent = parentC; // this has no effect
subReport.Compile();
e.Report = subReport;
}
How can I do this?
Thank you for help,
mira