Table header "Print on: except first page" problem
Posted: Wed Jul 04, 2018 10:11 am
Hello Team,
I have a problem when using a table header which should not be displayed on the first page where the table appears. The report in which I use the table is created in c# code dynamically, taking parts from a template. I have included the MRT template file in the attachments here. You can see that the table header is defined as "Print on: except first page".
All works well when a create a simple report file (see 'Correct_Rendering.pdf'). The table begins with a row containing two icons (Community Life and InterRisk). If the table had gone on to a second page, the table header would have been displayed - so all correct here.
The problem arises when I am merging sub-reports into a main report. As you can see here:
Please also see the file 'Not_Correct.pdf' - the table header thinks it is not on the first page of the table and displays itself. Of course, it is not the first page of the main report but this should not make any difference.
Do you have some trick I can use to get the table header to correctly check whether the table is on its first page or not? Perhaps there is some way using an event. I have tried with a DoublePass rendering of the sub-report but it did not help. I also tried adding the sub-report to the main report by resetting the page numbering as follows: mainReport.SubReports.Add(stiReport, true, false); - This causes the table header not to display on the first page of the table but completely messes up the page numbering for the main report, which I am displaying at the end of each page - therefore, no luck there.
Thanks in advance.
John Kitching
I have a problem when using a table header which should not be displayed on the first page where the table appears. The report in which I use the table is created in c# code dynamically, taking parts from a template. I have included the MRT template file in the attachments here. You can see that the table header is defined as "Print on: except first page".
All works well when a create a simple report file (see 'Correct_Rendering.pdf'). The table begins with a row containing two icons (Community Life and InterRisk). If the table had gone on to a second page, the table header would have been displayed - so all correct here.
The problem arises when I am merging sub-reports into a main report. As you can see here:
Please also see the file 'Not_Correct.pdf' - the table header thinks it is not on the first page of the table and displays itself. Of course, it is not the first page of the main report but this should not make any difference.
Do you have some trick I can use to get the table header to correctly check whether the table is on its first page or not? Perhaps there is some way using an event. I have tried with a DoublePass rendering of the sub-report but it did not help. I also tried adding the sub-report to the main report by resetting the page numbering as follows: mainReport.SubReports.Add(stiReport, true, false); - This causes the table header not to display on the first page of the table but completely messes up the page numbering for the main report, which I am displaying at the end of each page - therefore, no luck there.
Thanks in advance.
John Kitching