SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Add Styles to Your Reporting Services Reports


Add Styles to Your Reporting Services Reports

Author
Message
brian118
brian118
Mr or Mrs. 500
Mr or Mrs. 500 (524 reputation)Mr or Mrs. 500 (524 reputation)Mr or Mrs. 500 (524 reputation)Mr or Mrs. 500 (524 reputation)Mr or Mrs. 500 (524 reputation)Mr or Mrs. 500 (524 reputation)Mr or Mrs. 500 (524 reputation)Mr or Mrs. 500 (524 reputation)

Group: General Forum Members
Points: 524 Visits: 588
Good article... waiting for the rest :-)

Brian

Regards
Brian Ellul
----------------------------------------------------------------------------------
Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination.
- Albert Einstein -
Pueee
Pueee
Old Hand
Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)Old Hand (315 reputation)

Group: General Forum Members
Points: 315 Visits: 483
very informative! Thanks!
jcrawf02
jcrawf02
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2252 Visits: 19324
Several people mentioned storing the attributes in the database, then extracting them via a dataset. Barry King has a very nice blog post about this (as a reaction to Adam's article originally being published) here, and we've implemented it at work as described. Works very well, easy to maintain, don't have to touch the reports at all. Only caveat (you'll see it in the comments of the post) is that in header/footer areas you need to map the dataset value to a parameter, but that's simple enough.

We actually created a template for the team that includes the style dataset and header/footer elements (like logo, dept header, report name, global rundate, page numbers, confidentiality notice, etc) so that team members creating new reports don't have to do a thing in order to implement the default style. Saves a ton of time.

---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Daniel Bowlin
Daniel Bowlin
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4096 Visits: 2629
This article has been featured several times on SSC and I read it every time. However I just can't get past
Fourthly it is not possible to define a style which encompasses all the attributes of an object. For instance a font has a font family, colour, size and weight (and this list is not exhaustive). You will have to define a style for each individual element, unfortunately, as this is a limitation of BIDS. However, as there is no limit to the number of functions that you can add to the code tab in the Report properties dialog, there is nothing to stop you having different functions for each type of property that you wish to set dynamically.

As a result, using styles like this just seems to make me type more. Typing in one of the standard colors that I use, or font weight, or size, etc. is less typing than the expression to call the code. The key however, is that I have very standardized reports and I know what settings I want and where, many are already built into my template.

Let me end by saying that I love the thinking here, in HTML styles are a way to make things easier to write and maintain. This is certainly a worthy endeavour for SSRS, but this approach just seems like a bit more overhead than the standard way.
xCessivAwesome
xCessivAwesome
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 83
It might seem like a lot of typing at the onset (and it is), but it will save huge time down the road. AND the concept gives me [maybe] even more control over my style elements than using a typical cascading style sheet--anything I can manipulate in my SSRS report via an expression can be styled dynamically. I can pay attention to as much or as little as I want. I like that.

I created a process that basically dumps delimited text files into the tables via SQL scripting, so initial population is easy-peasy. Initially coming up with the style sets takes some time, but it's well worth the effort.

w00t
spcghst440
spcghst440
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 172
Not sure if it has been brought up yet, did not have time to go through the previous comments. however: http://technet.microsoft.com/en-us/library/ms345247.aspx
xCessivAwesome
xCessivAwesome
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 83
Thanks SPCGHST440,

CSS can be used to configure the report manager toolbar, but not the report contents. Here is an excerpt from that very page:

Modifying style sheets has no effect on the appearance of published reports that you run on a report server. In Reporting Services, reports do not reference style sheets. Ad hoc reports that are auto-generated by the report server use style information that is stored as an embedded resource in the report server program files. Reports that you create in Report Designer use the fonts, colors, and layout that you specify in the report definition. Styles are created inline with the rest of the layout.


Which is quite puzzling. If Microsoft took the time to partially support CSS, why not go full monty!? You still need an alternative way to dynamically style the report contents, which is what we're discussing here. Thanks for your input!

:-)
spcghst440
spcghst440
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 172
Ah, ty. That is LAME. They should give you the option to choose or to even mix and match. :-D
Daniel Bowlin
Daniel Bowlin
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4096 Visits: 2629
SQLMeat (10/8/2010)
Thanks SPCGHST440,

CSS can be used to configure the report manager toolbar, but not the report contents. Here is an excerpt from that very page:

Modifying style sheets has no effect on the appearance of published reports that you run on a report server. In Reporting Services, reports do not reference style sheets. Ad hoc reports that are auto-generated by the report server use style information that is stored as an embedded resource in the report server program files. Reports that you create in Report Designer use the fonts, colors, and layout that you specify in the report definition. Styles are created inline with the rest of the layout.


Which is quite puzzling. If Microsoft took the time to partially support CSS, why not go full monty!? You still need an alternative way to dynamically style the report contents, which is what we're discussing here. Thanks for your input!

:-)

Don't quote me on this but I think this makes sense. The Report Manager is a web app that is subject to style sheets. However I believe the reports are rendered before they get to the report manager and they come to the Report Manager as a kind of package that the Report Manager places into something akin to a web part.
jcrawf02
jcrawf02
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2252 Visits: 19324
Daniel Bowlin (10/8/2010)
SQLMeat (10/8/2010)
Thanks SPCGHST440,

CSS can be used to configure the report manager toolbar, but not the report contents. Here is an excerpt from that very page:

Modifying style sheets has no effect on the appearance of published reports that you run on a report server. In Reporting Services, reports do not reference style sheets. Ad hoc reports that are auto-generated by the report server use style information that is stored as an embedded resource in the report server program files. Reports that you create in Report Designer use the fonts, colors, and layout that you specify in the report definition. Styles are created inline with the rest of the layout.


Which is quite puzzling. If Microsoft took the time to partially support CSS, why not go full monty!? You still need an alternative way to dynamically style the report contents, which is what we're discussing here. Thanks for your input!

:-)

Don't quote me on this but I think this makes sense. The Report Manager is a web app that is subject to style sheets. However I believe the reports are rendered before they get to the report manager and they come to the Report Manager as a kind of package that the Report Manager places into something akin to a web part.
...couldn't resist...

---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search