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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment