on 08-20-2014 9:27 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.