How to apply customized css to SSRS report

前端 未结 2 1048
天命终不由人
天命终不由人 2021-01-04 22:17

I am new to SSRS. I have created a report and was able to deploy it on the server. I am calling the report from ASP.NET application. How can I change the CSS of the report?

相关标签:
2条回答
  • 2021-01-04 22:22

    You can customize the CSS at <drive>:\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\Stylesor you can specify your own Stylesheet.

    See this MSDN article for complete reference: Customizing Style Sheets for HTML Viewer and Report Manager

    0 讨论(0)
  • 2021-01-04 22:26

    Magier:

    There is a relatively simple way to do this (report by report) when using SSRS URL access to display the reports.

    You create custom stylesheets on the report server for whatever different options you want to show or hide (or anything else in the Report Toolbar that you want to customize) and save them to: :\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\Styles

    Then, you simply add an &rc:Stylesheet= parameter to the URL you use to display the report, and spec whichever stylesheet you want. Your code can determine what the value of the rc:Stylesheet is:

    ie:

    http://localhost/reportserver?/AdventureWorksSampleReports/Product+Line+Sales&rs:Command=Render&rc:Stylesheet=NameOfYourStlesheetSansExtension

    So as you can see, it can be dynamic, and (as far as I can tell), is the only straightforward way of controlling the ReportViewer styles in SSRS.

    Source (same as the above answers, I just wanted to explain how to style on report by report basis): https://msdn.microsoft.com/en-us/library/ms345247.aspx

    0 讨论(0)
提交回复
热议问题