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

sql server reporting services : Using CSS for HTML output


murphy NO[at]SPAM murphysw.com
8/1/2004 10:15:04 PM
This may be a dumb question because I'm just starting out. Is it
possible to specify a stylesheet for the HTML output option of a
report?

Brian Hartman [MSFT]
8/2/2004 12:51:52 PM
In SP1 you can specify a stylesheet for the viewer (the toolbar, document
map, and parameters area) but not for the report. See the SP1 readme for
details.

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

[quoted text, click to view]

Bryan Keller [MSFT]
8/2/2004 1:18:44 PM
The body of the HTML report is defined when you layout your report in the
Designer. Specifying a stylesheet for the report at runtime is not part of
Reporting Services core functionality. There are stylistic changes you can
make at run time using custom assemblies but it gets complicated and
requires jumping through a number of hoops. Some third-party books coming
out this Fall will discuss this more in detail. You can however change the
look and feel of the HTML viewer toolbar that renders with HTML reports
using an enhancement in our Service Pack 1. The readme for SP1 has more
details. This feature enables you to specify a custom CSS for the viewer.

I hope this helps.

--
Bryan Keller
Developer Documentation
SQL Server Reporting Services

A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.


[quoted text, click to view]

Jeff_R
8/19/2004 8:09:05 AM
First off I think reporting services shows alot of promise.

I am hoping it is planned that more CSS support can go into the actual
report. RS right now is creating gigantic HTML pages/page fragments that
take a good amount of time to download unless you are on the LAN with the
report server. If you look at the output it is obvious that the inline style
attributes are completely responsible for this. It would be nice if we could
specify a CSS class on a table element or row or even at table cell level.
Right now it looks like almost all formatting is done inline at the cell
level.

Even if CSS is meaningless for PDFs or images or all the other output
formats it would be nice if we had the option to turn off inline styles for
HTML output and use CSS only. If we could just tag the output elements with
a CSS class name that would be much more space efficient. To me the report
doesn't have to look in the designer exactly like it is going to look like
when output in HTML after CSS is applied. I can imagine what it is going to
look like after CSS just like designing web controls with Visual Studio.

I am hoping more CSS support is considered as a future enhancement.

[quoted text, click to view]
Bryan Keller [MSFT]
8/19/2004 11:11:43 AM
As I mentioned, there is a way to add CSS style support and template support
across multiple reports using custom assemblies. The book "Hitchhikers Guide
to Reporting Services" by Blackburn and Vaughan has an entire chapter
devoted to it. I would definitely check out that book.

--
Bryan Keller
Developer Documentation
SQL Server Reporting Services

A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.


[quoted text, click to view]

AddThis Social Bookmark Button