Tuesday, March 20, 2012
applying styles to reports DataTransform property
the like in my report. The DataTransform documentation ain't so great.
After creating the xsl file and uploading it to the server and setting the
DataTransform property no changes were evident, I think it only operates on
xml format or something along those lines. Mainly we use pdf and html
rendering. So now I'm thinking I can apply the xsl and generate different
styles when I deploy the reports and add the drop down style selection to
the web app. Anyone giving their users the ability to pick a report style,
and how are you going about it? Any thoughts?
For Example:
deployment:
msxsl myReport.rdl slate.xsl -xe -o myReport_slate.rdl
msxsl myReport.rdl forest.xsl -xe -o myReport_forest.rdl
Here's an example xsl
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msrs="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
exclude-result-prefixes="msrs xs fn">
<xsl:output method="xml" standalone="no" omit-xml-declaration ="no"
indent="yes"/>
<xsl:template match="//msrs:FontFamily">
<FontFamily>Tahoma</FontFamily>
</xsl:template>
<xsl:template match="//msrs:BackgroundColor">
<BackgroundColor>SteelBlue</BackgroundColor>
</xsl:template>
<xsl:template match="@.* | node()" priority="-2">
<xsl:copy>
<xsl:apply-templates select="@.* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>Hi, I read your post regarding the use of DataTransform in reporting service. If you make any progress with it, would be kind enough to share it?
Thank You.
Rif'at
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.comsql
Monday, March 19, 2012
Applying colors to reports
Is there a way to apply .css or Skin files to all reports. Changing colors in each and every page is a little cumbersome.
Thanks in advance
Unfortunately no. HTML control is on the wishlist for the next version I believe.|||How about creating a custom assembly and putting your formatting functions in this centralized shared library? Instead of hard-coding colors in your report, reference the shared library. I am in the process of creating 50 reports where the color scheme has not been finalized, and I need the ability to change the color scheme globally. Maybe I can code a way to pull the formatting information from a database table. It would be easier to update the colors that way, instead of having to redeploy the assembly dll with every color change.|||We have been looking for the same thing, finally we did put our colors (textual) in a database-table and assign text and background colors with an expression, causes some work to do, this for earch report but once done, you can change al your reports depending on the season or whatever crazy reason to change layouts.
Even our header images come from a database so during some periods we can (just like google) do some funny stuff.
Users mostly appreciate it.
Applying colors to reports
Is there a way to apply .css or Skin files to all reports. Changing colors in each and every page is a little cumbersome.
Thanks in advance
Unfortunately no. HTML control is on the wishlist for the next version I believe.|||How about creating a custom assembly and putting your formatting functions in this centralized shared library? Instead of hard-coding colors in your report, reference the shared library. I am in the process of creating 50 reports where the color scheme has not been finalized, and I need the ability to change the color scheme globally. Maybe I can code a way to pull the formatting information from a database table. It would be easier to update the colors that way, instead of having to redeploy the assembly dll with every color change.|||We have been looking for the same thing, finally we did put our colors (textual) in a database-table and assign text and background colors with an expression, causes some work to do, this for earch report but once done, you can change al your reports depending on the season or whatever crazy reason to change layouts.
Even our header images come from a database so during some periods we can (just like google) do some funny stuff.
Users mostly appreciate it.