Posted 10 October 2020, 1:05 am EST
I have a AR14 section report MyReport. This MyReport contains a ReportHeader and Detail. Within the Detail, there is just a SubReport (MySubReport), which displays a couple of records.
public MyReport() {
this.InitializeComponent();
this.Detai.Format += this.OnFormatDetail;
}
private void OnFormatDetail(object sender, EventArgs e) {
MySubReport report = new MySubReport();
report.DataSource = this.DataSource;
this.subReportDetail.Report = report;
}
When I print the report, everything is fine.
Now, for customization purpose, I added another label and picture in MyReport in the ReportHeader and save the report as an RPX (VisualStudio > Extensions > Report > Save Layout).
Now, when I create the report and load the above saved RPX, the SubReport is not displayed anymore.
MyReport report = new MyReport();
XmlTextReader xtr = new XmlTextReader("C:\\Temp\\Report.rpx");
report.LoadLayout(xtr);
xtr.Close();
report.DataSource = ...
The DataSource is exactlly the same.
I attached the Report, SubReport and RPX.
ReportsAndRpx.zip