I was hoping that I could create an xsl file to change background colors and
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
Showing posts with label property. Show all posts
Showing posts with label property. Show all posts
Tuesday, March 20, 2012
Monday, March 19, 2012
Applying CSS to SRS Reports
Hi , I hava a quick question about can we apply Css to actual repots in the
SRS ?
Since i figured out there is one property comes with SP1 i.e.,
rc:Stylesheet=Mystylename (without css extension) but this solution can only
resolve my half problem i.e., it applies only to parameter section and
toolbar section of the report but i wanted to apply for complete report
display while rendering it or displaying with the use of ReportViewer control.
Any Help is appreciated.
Thanks in advance.
APatelWe have the same want, we ended up using a near identity xsl to transorm the
unstyled report into 3 styles that we use as a subreport. The outer report
uses the style as a parameter, then we show/hide the subreports based on the
style...Yes it's very clunky, I'm looking for suggestions on a better way.
Here's my xsl file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0"
xmlns:msrs="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:fn="http://www.w3.org/2005/02/xpath-functions"
exclude-result-prefixes="msrs xs fn">
<xsl:output encoding="iso-8859-1" method="xml" omit-xml-declaration ="yes"
indent="yes"/>
<xsl:template match="//msrs:FontFamily">
<msrs:FontFamily>Tahoma</msrs:FontFamily>
</xsl:template>
<xsl:template
match="//msrs:Textbox/msrs:Style[msrs:BackgroundColor='#fbee83']/msrs:BackgroundColor">
<msrs:BackgroundColor>#4e0000</msrs:BackgroundColor>
<msrs:Color>White</msrs:Color>
</xsl:template>
<xsl:template
match="//msrs:Textbox/msrs:Style[msrs:BackgroundColor='SandyBrown']/msrs:BackgroundColor">
<msrs:BackgroundColor>Maroon</msrs:BackgroundColor>
<msrs:Color>White</msrs:Color>
</xsl:template>
<xsl:template match="//msrs:Textbox/msrs:Style[contains(., 'Mod 2,
"White", "Wheat"')]/msrs:BackgroundColor">
<msrs:BackgroundColor>= iif(RowNumber(Nothing) Mod 2, "White",
"LightGrey")</msrs:BackgroundColor>
</xsl:template>
<xsl:template match="@.* | node()" priority="-2">
<xsl:copy>
<xsl:apply-templates select="@.* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
"APatel" <APatel@.discussions.microsoft.com> wrote in message
news:B6D65976-EF0D-4BD0-A8A0-798CD71678A5@.microsoft.com...
> Hi , I hava a quick question about can we apply Css to actual repots in
> the
> SRS ?
> Since i figured out there is one property comes with SP1 i.e.,
> rc:Stylesheet=Mystylename (without css extension) but this solution can
> only
> resolve my half problem i.e., it applies only to parameter section and
> toolbar section of the report but i wanted to apply for complete report
> display while rendering it or displaying with the use of ReportViewer
> control.
> Any Help is appreciated.
> Thanks in advance.
> APatel
SRS ?
Since i figured out there is one property comes with SP1 i.e.,
rc:Stylesheet=Mystylename (without css extension) but this solution can only
resolve my half problem i.e., it applies only to parameter section and
toolbar section of the report but i wanted to apply for complete report
display while rendering it or displaying with the use of ReportViewer control.
Any Help is appreciated.
Thanks in advance.
APatelWe have the same want, we ended up using a near identity xsl to transorm the
unstyled report into 3 styles that we use as a subreport. The outer report
uses the style as a parameter, then we show/hide the subreports based on the
style...Yes it's very clunky, I'm looking for suggestions on a better way.
Here's my xsl file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0"
xmlns:msrs="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:fn="http://www.w3.org/2005/02/xpath-functions"
exclude-result-prefixes="msrs xs fn">
<xsl:output encoding="iso-8859-1" method="xml" omit-xml-declaration ="yes"
indent="yes"/>
<xsl:template match="//msrs:FontFamily">
<msrs:FontFamily>Tahoma</msrs:FontFamily>
</xsl:template>
<xsl:template
match="//msrs:Textbox/msrs:Style[msrs:BackgroundColor='#fbee83']/msrs:BackgroundColor">
<msrs:BackgroundColor>#4e0000</msrs:BackgroundColor>
<msrs:Color>White</msrs:Color>
</xsl:template>
<xsl:template
match="//msrs:Textbox/msrs:Style[msrs:BackgroundColor='SandyBrown']/msrs:BackgroundColor">
<msrs:BackgroundColor>Maroon</msrs:BackgroundColor>
<msrs:Color>White</msrs:Color>
</xsl:template>
<xsl:template match="//msrs:Textbox/msrs:Style[contains(., 'Mod 2,
"White", "Wheat"')]/msrs:BackgroundColor">
<msrs:BackgroundColor>= iif(RowNumber(Nothing) Mod 2, "White",
"LightGrey")</msrs:BackgroundColor>
</xsl:template>
<xsl:template match="@.* | node()" priority="-2">
<xsl:copy>
<xsl:apply-templates select="@.* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
"APatel" <APatel@.discussions.microsoft.com> wrote in message
news:B6D65976-EF0D-4BD0-A8A0-798CD71678A5@.microsoft.com...
> Hi , I hava a quick question about can we apply Css to actual repots in
> the
> SRS ?
> Since i figured out there is one property comes with SP1 i.e.,
> rc:Stylesheet=Mystylename (without css extension) but this solution can
> only
> resolve my half problem i.e., it applies only to parameter section and
> toolbar section of the report but i wanted to apply for complete report
> display while rendering it or displaying with the use of ReportViewer
> control.
> Any Help is appreciated.
> Thanks in advance.
> APatel
Thursday, February 16, 2012
append property value
i am using sp_OASetProperty for setting property value for a cdo.message
object. But it might happen body size is more than 8000 character... in that
case i want to write follwoing statement in a loopHi
I don't think you can do this, have you looked at xp_smtp?
http://www.sqldev.net/xp/xpsmtp.htm
John
"Vikram" wrote:
> i am using sp_OASetProperty for setting property value for a cdo.message
> object. But it might happen body size is more than 8000 character... in th
at
> case i want to write follwoing statement in a loop
>
>
object. But it might happen body size is more than 8000 character... in that
case i want to write follwoing statement in a loopHi
I don't think you can do this, have you looked at xp_smtp?
http://www.sqldev.net/xp/xpsmtp.htm
John
"Vikram" wrote:
> i am using sp_OASetProperty for setting property value for a cdo.message
> object. But it might happen body size is more than 8000 character... in th
at
> case i want to write follwoing statement in a loop
>
>
Subscribe to:
Posts (Atom)