Groups | Blog | Home
all groups > sql server reporting services > august 2004 >

sql server reporting services : Stylesheet problems



Bradley Plett
8/24/2004 6:55:06 PM
I can't seem to get the stylesheet to work. I've followed the
instructions in
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_new_url_access_parameters
(and other documents like it) to the letter, and still no luck. I've
tried this now on two different installations, one with SQL2000 and RS
SP1 (build 8.00.878.00), and one with SQL2005 Beta 2 (RS build
9.00.852.00), with the same results on both.

The clearest indicator that there is a problem is the fact that when I
do a "view source" of the rendered report in IE, there is no reference
to a stylesheet of any kind.

I've tried opening the security to that subdirectory right up, but
that made no difference. One other tidbit is that when I try to open
my stylesheet in the browser (i.e. browse to
http://localhost/ReportServer/styles/MyStyle.css), I get the same
result as if I browse to http://localhost/ReportServer/. That may
well be an expected behavior - I don't know.

Any ideas?

Thanks!
Brian Hartman [MSFT]
8/24/2004 7:26:31 PM
From your message, it isn't clear if you are trying to use the stylesheet
through Report Manager. The rc:stylesheet parameter will only work through
the report server directly (http://localhost/reportserver), not the Report
Manager (http://localhost/reports).

If you specify the rc:stylesheet parameter and it is not applied, there
should be an indication of that in the report server log files.

--
This posting is provided "AS IS" with no warranties, and confers no rights


[quoted text, click to view]

Bradley Plett
8/25/2004 9:02:11 AM
Here's what I'm using for a URL:
http://localhost/ReportServer?%2fReport+Project+01%2fPPI&rc:Stylesheet=MyStyle

Since I'm having the same problem on two different installations, I'm
more than willing to believe that it's something I'm doing wrong.
However, I can't figure out what it is. As I said, when I do a "view
source" of the rendered report in IE, there is no reference to a
stylesheet of any kind. There is also nothing in the server log
files.

You mention that "there should be an indication of that in the report
server log files." I assume you're talking about the IIS log files in
"C:\WINDOWS\SYSTEM32\Logfiles\W3SVC1" (or similar). Is that right?
Are there other logs I'm not aware of?

Thanks!
Brad.


On Tue, 24 Aug 2004 19:26:31 -0700, "Brian Hartman [MSFT]"
[quoted text, click to view]
Brian Hartman [MSFT]
8/25/2004 9:58:29 AM
Your URL looks correct.

The report server log files are located in \Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\LogFiles\ReportServer*.log

--
This posting is provided "AS IS" with no warranties, and confers no rights

[quoted text, click to view]

Bradley Plett
8/25/2004 11:44:47 AM
Well, looking at that those logs did show an error, but it got me no
closer to a solution. :-(

Here are the excerpts of interested (sorry about the wrapping!):

Here's the one from SQL2000, showing an error.
------------------------------
aspnet_wp!library!340!08/25/2004-11:30:48:: i INFO: Call to
RenderFirst( '/Report Project 01/PPI' )

aspnet_wp!library!340!08/25/2004-11:30:48:: i INFO: Initializing
EnableExecutionLogging to 'True' as specified in Server system
properties.

aspnet_wp!webserver!340!08/25/2004-11:30:48:: i INFO: Processed
report. Report='/Report Project 01/PPI', Stream=''

aspnet_wp!chunks!340!08/25/2004-11:30:48:: i INFO: ###
GetReportChunk('C_158_S', 1), chunk was not found!
this=e0817e85-802f-4bb1-a481-f118b0f18e6e

aspnet_wp!webserver!340!08/25/2004-11:30:49:: i INFO: Processed
report. Report='/Report Project 01/PPI', Stream='C_158_S'
------------------------------

The one from from SQL2005 shows no error:
------------------------------
w3wp!library!c2c!08/25/2004-11:41:13:: i INFO: Call to RenderFirst(
'/Report Project 01/PPI' )

w3wp!library!c2c!08/25/2004-11:41:13:: i INFO: Initializing
EnableExecutionLogging to 'True' as specified in Server system
properties.

w3wp!webserver!c2c!08/25/2004-11:41:13:: i INFO: Processed report.
Report='/Report Project 01/PPI', Stream=''
------------------------------

How do I troubleshoot this further?

Brad.

On Wed, 25 Aug 2004 09:58:29 -0700, "Brian Hartman [MSFT]"
[quoted text, click to view]
Brian Hartman [MSFT]
8/25/2004 12:35:08 PM
None of those entries are errors - that they all have "i INFO". Is there
anything in the log file that specifically relates to stylesheets, such as
"User specified style sheet does not exist"? In looking at my own log
files, I see that the stylesheet entries are actually info instead of error
since it is not fatal.

--
This posting is provided "AS IS" with no warranties, and confers no rights

[quoted text, click to view]

Brian Hartman [MSFT]
8/25/2004 1:33:09 PM
There won't be a message if everything was succssful. You mentioned earlier
that the stylesheet was not referenced in the html. Were you looking
specifically for the file name? The stylesheet will not be generated as a
link. It will be inline in the html, in the <head> section. If the
stylesheet was not used and not logged (which would be a bug) then you
should see a reference to the built in stylesheet as a <link>.

Will you also send the IIS logs with the URL query turned on in the log?

--
This posting is provided "AS IS" with no warranties, and confers no rights


[quoted text, click to view]

Bradley Plett
8/25/2004 2:10:45 PM
If I delete the style sheet, I do get the following:

-- 2k5 -----------------------
w3wp!configmanager!538!08/25/2004-13:57:04:: i INFO: User specified
style sheet does not exist: C:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting Services\ReportServer\styles\MyStyle.css
------------------------------

-- 2k ------------------------
aspnet_wp!configmanager!850!08/25/2004-14:06:16:: i INFO: User
specified style sheet does not exist: C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\styles\MyStyle.css
------------------------------

When I put the style sheet back, this message goes away, and no
problem is recorded in the log. However, the rendered report still
does not use the style sheet, and the HTML source makes no mention of
the stylesheet. Do you see anything in your log when a stylesheet is
successfully used?

Thanks!
Brad.

On Wed, 25 Aug 2004 12:35:08 -0700, "Brian Hartman [MSFT]"
[quoted text, click to view]
Bradley Plett
8/25/2004 2:46:25 PM
OK, I'm feeling both foolish and disappointed. I assumed that the
stylesheet would affect the report. As I've now discovered (and
probably should have known anyway) is that the stylesheet affects ONLY
the toolbar! :-( This was clearly my misunderstanding, and I'm sorry
for wasting your time.

Of course, it does bring up an issue, which is what I was really
after. I would very much like to be able to apply a stylesheet to the
report itself. We have a few large clients, who in turn have clients
that use our reports. One of the things we need is to brand the
reports differently based on the large client. With our hand-coded
ASP.NET solution, this was trivially handled by applying a different
stylesheet for each large client. Is there any similar functionality
that I could use with RS?

Thanks!
Brad.


On Wed, 25 Aug 2004 14:10:45 -0600, Bradley Plett <plettb@hotmail.com>
[quoted text, click to view]
Brian Hartman [MSFT]
8/25/2004 7:47:56 PM
Unfortunately, there is no way to supply a stylesheet for the report
contents.

--
This posting is provided "AS IS" with no warranties, and confers no rights

[quoted text, click to view]

Don H
11/23/2004 7:19:01 AM
That stinks!
Will there be a way to apply stylesheets to the report contents in SQL 2005?
Also, how do you specify the rc:stylesheet URL access parameter in the
report designer? I cannot for the life of me find out where.

Thanks,
Don

[quoted text, click to view]
Bruce L-C [MVP]
11/23/2004 9:58:57 AM
RS is not just xml/xsl/data solution. It is a format independent reporting
solution of which html output is just one of the rendering formats (an
important one but still just one of the formats). How the report contents
look is defined by the Report Definition Language, this is an xml defined
format that MS has documented. Some people create the RDL on the fly. With
SQL 2005 this will be easier to do with the addition of new webform and
winform controls (I am guessing on this point, I am extrapolating based on
what MS has said about the forthcoming controls).

To do what you want I think you need to think about having images, text etc
that can vary depending on who gets the report. With SP1 you can have
external images so it is very easy to have images that are included in the
report be different for each site. If you could define some of the text
displayed in the database this is another way to customize the looks some as
well.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services


[quoted text, click to view]

AddThis Social Bookmark Button