cancel
Showing results for 
Search instead for 
Did you mean: 

Report CSS not working after upgrade

Former Member
0 Kudos

I have been researching this issue for days with no luck.  I recently upgraded a project from VS2008 to VS1013.  During this process, I downloaded and installed the 13.0.10 installer.  Everything seems to work great except for the CSS functionality on the reports (not the report viewer).  Here's the scenario:

A webform has a reportviewer control and a link to the css file (Reports.css):

<head id="head1" runat="server">

    <link href="Reports.css" rel="stylesheet" type="text/css" />

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"

            AutoDataBind="true" HasCrystalLogo="False" Height="50px" Width="350px"

            style="position:relative;z-index:0;" CssFilename="ReportViewer.css" ClientIDMode="Inherit" HasRefreshButton="False"></CR:CrystalReportViewer>

    </div>

    </form>

</body>

Prior to converting the project this would cause the report to be rendered according to the CSS style rules.  After converting the project it does not.  It seems the issue is related to the fact that the report viewer now renders the report output to an iFrame, but I cannot find a way to make the iFrame use the stylesheet.  How do we get the CSS style applied to the reports?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

UPDATE:

When inspecting the rendered iframe's source, I can see that the CSSClass names specified in the report document have been modified.  In the test report I am working with, the detail field's CSSClass is called "DetailField", but the resulting HTML shows a different class name (see below).

<span class="fc437d0bef-5614-4d69-8b61-66b69cc7ac52-1 DetailField">

I am currently working to make this work via jquery, but I've never used it in a project before and I'm struggling with it.  If anyone knows how to make this work, please let me know.

Thank you

Former Member
0 Kudos

The jquery idea has gotten me nowhere.  I can't believe that this cannot be resolved somehow.  Does anyone use report CSS with 13.x?  I am hoping that I am overlooking the obvious.

Thanks

former_member183750
Active Contributor
0 Kudos

Can you share the css file you are using? rename it to .txt, then click on Use advanced editor and attach.

- Ludek

Former Member
0 Kudos

Attached.

Answers (0)