ReportViewer Control Ignoring Stylesheet in ASP.NET Web Page

J

John R. Millwood

I have applied a stylesheet class to a ReportViewer control on an ASP.NET Web
Page, but the control ignores it. The control is automatically creating
inline styles that override the stylesheet. I'm not trying to apply styles
to the report format, just the report viewer container.

I'm using themes (ie. <pages styleSheetTheme="Default"> from Web.config).
My themes are working for other controls, just the ReportViewer control will
not work.

Follow is my stylesheet class:

..report
{
border: 1px solid #D1D6C5;
font-family: Verdana;
font-size: 8pt;
width: 100%;
height: 600px;
}

and I want to do this:

<rsweb:ReportViewer ID="MyReportViewer" runat="server" CssClass="report" >

....

</rsweb:ReportViewer>


When you View Source in the browser, you see the class "report", but the
control is automatically generating inline styles which are overriding the
stylesheet.

I'm having to do the following since the stylesheet is being ignored:


<rsweb:ReportViewer ID="OrderSummaryReportViewer" runat="server"
Font-Names="Verdana"
Font-Size="8pt"
Width="100%"
Height="600px"
BorderColor="#D1D6C5"
BorderStyle="Solid"
BorderWidth="1px">

.....

</rsweb:ReportViewer>

I'm running VS2008 SP1, 3.5 Framework

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top