Search code examples
crystal-reports-2010

CrystalReportViewer on ASP.NET website


I prepared a small web application do display crystal report documents with CrystalReportViewer (v. 13.0.6.x). Everything works fine except the presentation of CrystalReportViewer it self. A big grey panel appears on the left side of report and I have no idea where it comes from. I deactivated the ToolPanelView and also GroupTree- and ParameterPanelButtons, but the result is still the same. (I would like to post a screenshot of this problem but do not have enough reputation points and all image hoster are blocked by company firewall)

This problem appears on IE8 and IE9. Google Chrome and Firefox seems to be ok. I think it has something to do with security settings of IE or WebServer. When I open the site on the web server and use http:\localhost... as my url, everything is ok. When I use the IP-address of the server instead of 'localhost' I get this problem.

Any idea?


Solution

  • I think I got it. My HTML style regarding position of CrystalReportViewer control seems to affect the presentation of it in the IE. I changed my previous definition and now it seems to work.

    Old code:

    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tr>
            <td align="center" style="width: 100%; height: 100%">
                <CR:CrystalReportViewer ID="CrystalReportViewer" runat="server"
                        ToolPanelView="None" HasDrilldownTabs="False" />
            </td>
        </tr>
    </table>
    

    New code:

    <div style="width: 800px; margin-left: auto; margin-right: auto;">
        <CR:CrystalReportViewer ID="CrystalReportViewer" runat="server" 
             ToolPanelView="None" />
    </div>
    

    Hope this will help others.