4

I have an HTML page that I wrote that I need to host in the SSRS Report Manager, due to some restrictions. The HTML is just a collection of static web pages that connect to a Style.css style sheet.

When I run the pages outside SSRS they work fine, but when I run them in the Report Manager I lose my styling in the HTML. I am not sure what I need to change for this to work in SSRS and Report Manager.

I tried the logical thing which was an absolute path to the CSS file in SSRS and the process found here: http://msdn.microsoft.com/en-us/library/ms345247.aspx but I can't get either to work. Any help would be greatly appreciated.

2
  • 1
    Have you tried changing the RSReportServer.config file and placing your CSS file in the same folder as the Report Manager’s CSS file? Aug 15, 2012 at 21:02
  • I saw a couple articles on that but I don't have access to the actual server so that I can access that file.
    – bkorzynski
    Aug 16, 2012 at 13:26

1 Answer 1

4

The trick is that you have to point it to the ReportServer URL not the Reports URL. See the below examples which demonstrates how the URL changes. Before

http://<reportserver>/Reports/Pages/Resource.aspx?ItemPath=%2f<folderPath>%2fStyle.css

After

https://<reportserver>/ReportServer/Pages/Resource.aspx?%2f<folderPath>%2fStyle.css

As a test you can enter it into your browsers address bar and it is shows you the code then you have it correct. If not then it will have you download the file. Then from there you just put it in the link tag of HTML, like below.

<link href="https://<reportserver>/ReportServer/Pages/Resource.aspx?%2f<folderPath>%2fStyle.css" type="text/css" rel="stylesheet">

Note that if you are accessing this from the same root (https://<reportserver>/ReportServer/Pages) that your page is located, then you can use the short hand as follows.

<link href="~/Resource.aspx?%2f<folderPath>%2fStyle.css" type="text/css" rel="stylesheet">
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.