Problem with subreports and pagenumbering
Posted: Wed May 16, 2007 8:30 am
Hi,
Today I had a problem while creating a report from code and adding 2 subreports to it. When showing the report no pagenumbering was shown.
StiReport MainReport;
TestSubReport1 SubReport1;
TestSubReport2 SubReport2;
MainReport = new StiReport();
SubReport1 = new TestSubReport1();
SubReport2 = new TestSubReport2();
MainReport.SubReports.Add(SubReport1);
MainReport.SubReports.Add(SubReport2);
MainReport.Render(true);
MainReport.Show();
The MainReport is created just from code. I included the .cs-files of SubReport1&2.
The SubReport1 has a ReportFooter with the following expression in it: {PageNumber}/{TotalPageCount}.
The SubReport2 has no pagenumbering at all.
When the MainReport is rendered and shown, the pagenumbering of SubReport1 has disappeared.
When I render SubReport1 on its own, the pagenumbering is clearly shown. Maybe there's a little bug when using subreports and pagenumbering together?
Today I had a problem while creating a report from code and adding 2 subreports to it. When showing the report no pagenumbering was shown.
StiReport MainReport;
TestSubReport1 SubReport1;
TestSubReport2 SubReport2;
MainReport = new StiReport();
SubReport1 = new TestSubReport1();
SubReport2 = new TestSubReport2();
MainReport.SubReports.Add(SubReport1);
MainReport.SubReports.Add(SubReport2);
MainReport.Render(true);
MainReport.Show();
The MainReport is created just from code. I included the .cs-files of SubReport1&2.
The SubReport1 has a ReportFooter with the following expression in it: {PageNumber}/{TotalPageCount}.
The SubReport2 has no pagenumbering at all.
When the MainReport is rendered and shown, the pagenumbering of SubReport1 has disappeared.
When I render SubReport1 on its own, the pagenumbering is clearly shown. Maybe there's a little bug when using subreports and pagenumbering together?