Adding custom “3 section” footer to default report template

五迷三道 提交于 2020-01-06 05:45:13

问题


What is the best approach for creating a "3 section" (left, right, center) report footer in SSRS 2005?

I'm putting the report ID and version number in the bottom left hand corner- the print (current) date/time in the center and page x of y on the right.

Currently I simply place three overlapping text boxes with different alignment but I get warnings: [rsOverlappingReportItems] The textbox ‘textbox28’ and the textbox ‘textbox19’ overlap. Overlapping report items are not supported in all renderers.

What would a better way of doing this be?

Can I then modify the default template or add to the wizard so my new reports all include this?


回答1:


With this I'm answering the following part of your question:

Can I then modify the default template or add to the wizard so my new reports all include this?

You actually can modify the default template. The default template is actually just a simple report, a .rdl file. It's located in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\

So what you need to do is create a report that will be your template, then replace the content of the Report.rdl with the content of your template report. You can right-click the report in Solution Explorer and select View Code to copy the content to clipboard (or use any text editor).

Alternatively, you can leave the default report.rdl as is, and add an additional .rdl in that folder which will serve as your template. Any .rdl added in that folder will appear when you do Add > New Item in Solution Explorer.

(For SSRS 2008, the path above would be: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject)




回答2:


As @Valentino said we can modify the default template globally or you can follow this procedure for modifying locally. You can acheive this by.

create a report with what you need by default like having the Report header and Report Footer with the 3 textboxes and alignment and content in report footer textboxes and page margins if needed. Assume this as the template for all the reports.

Next in the solution explorer when you want to create the new report then right click on the report you created as the template and press copy. Click on the solution explorer area and press ctrl+v. This will create a copy of the report template.

Rename it and use it.



来源:https://stackoverflow.com/questions/9750776/adding-custom-3-section-footer-to-default-report-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!