
Stephen McDaniel
Top achievements
Rank 1
Stephen McDaniel
asked on 05 Jun 2008, 08:26 PM
It seems that if I place a SubReport in the PageHeader or PageFooter sections, the SubReport is not displayed when I export the report.
I'm using the Web Viewer, and the SubReport shows fine when I'm looking at the report in the viewer, but if I do an export (or print via PDF), I just see blank space where the sub report should be.
I'm using the Web Viewer, and the SubReport shows fine when I'm looking at the report in the viewer, but if I do an export (or print via PDF), I just see blank space where the sub report should be.
4 Answers, 1 is accepted
0
Accepted
Hi Stephen McDaniel,
Thank you for contacting Telerik Support.
This PageHeader/Footer section is printed at the top/bottom of every page. For example, you can use the page header to repeat the report title on every page. Since the paging of a report strongly depends on the format it is rendered to, this section and its items are processed by the corresponding rendering extension after the report data has been processed. At this moment the report data source isn't available anymore and you cannot add data-bound items directly to the Page Header/Footer section.
In other words, you should not use a SubReport in the PageHeader/Footer sections as described in the help topic Understanding Report Sections. Please take a look at the article and let us know if you have any further questions.
Sincerely yours,
Ross
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for contacting Telerik Support.
This PageHeader/Footer section is printed at the top/bottom of every page. For example, you can use the page header to repeat the report title on every page. Since the paging of a report strongly depends on the format it is rendered to, this section and its items are processed by the corresponding rendering extension after the report data has been processed. At this moment the report data source isn't available anymore and you cannot add data-bound items directly to the Page Header/Footer section.
In other words, you should not use a SubReport in the PageHeader/Footer sections as described in the help topic Understanding Report Sections. Please take a look at the article and let us know if you have any further questions.
Sincerely yours,
Ross
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Stephen McDaniel
Top achievements
Rank 1
answered on 06 Jun 2008, 04:36 PM
Thanks for the quick reply. Perhaps I should explain my situation more. I want to have a standard header and footer on all my reports. And by standard, I mean that I can change it in one place and all my reports will reflect the change.
I'm currently achieving this by have a special report, my Header Report, that has things like the company name, etc. None of this is dependent on the data of the report. Then I place a SubReport in the header or all my reports with it's ReportSource set to the Header Report. This method works fine when I'm viewing the report and even works fine when I export to a web-archive - but all other export formats just display blank space.
I also tried making a class that extended Panel that pre-populates it's Items collection with all the necessary controls but I don't have the nice design-time experience I have when editing a sub report.
Is there any plan for adding support for SubReports that aren't data-dependent in Page Headers/Footers? If not, I can use the Panel method I described - unless there is some other, better way of having shared/standard headers.
Thanks
I'm currently achieving this by have a special report, my Header Report, that has things like the company name, etc. None of this is dependent on the data of the report. Then I place a SubReport in the header or all my reports with it's ReportSource set to the Header Report. This method works fine when I'm viewing the report and even works fine when I export to a web-archive - but all other export formats just display blank space.
I also tried making a class that extended Panel that pre-populates it's Items collection with all the necessary controls but I don't have the nice design-time experience I have when editing a sub report.
Is there any plan for adding support for SubReports that aren't data-dependent in Page Headers/Footers? If not, I can use the Panel method I described - unless there is some other, better way of having shared/standard headers.
Thanks
0

rick0735
Top achievements
Rank 1
answered on 06 Jun 2008, 09:17 PM
Why not just make your header report act like a master page? Then add the other reports you are generating as the subreport (which is to say, you probably would need to add them programatically as the subreport's "ReportSource" just prior to generating the "master" report), placed in the DetailSection where subreports usually go.
0

Stephen McDaniel
Top achievements
Rank 1
answered on 06 Jun 2008, 09:26 PM
Thanks for the suggestion. That's not a bad idea, however, I often want more than just the "standard header" on every page. For example, I might want the standard header as well as column headings on every page.
I could dynamically copy over the "content report's" PageHeader controls over to the "master report's"page header, but it seems like that would be a lot of work.
For now it seems that using a custom built Panel as the standard header seems to be the most flexible solution.
Thanks again for giving me another option to think about.
I could dynamically copy over the "content report's" PageHeader controls over to the "master report's"page header, but it seems like that would be a lot of work.
For now it seems that using a custom built Panel as the standard header seems to be the most flexible solution.
Thanks again for giving me another option to think about.