I found while doing compatibility testing, with IE 9 in compatibility mode (which is the default behavior for intranet sites), that the Crystal Report viewer displayed wrong when the parent element had any text-align set other than left. This would be true if the setting is inherited too. What I observed is the horizontal start position of the report in the control was starting at the text-align setting. Meaning that if text-align was left, the report started at the left, showing the whole report; if text-align was center, the report would start at the center showing only left half of the report; and if text-align was right, the report would start on the right and wouldn’t be visible at all.
The workaround is to wrap the viewer in a div and add to its style text-align:left. Hope this helps others.
This code will not show the report (it’s off the viewer rendering space):
<div style="text-align:right">
<CR:CrystalReportViewer
ID="myReport"
runat="server"
AutoDataBind="true"
HasCrystalLogo="False"
ToolPanelView="None"
ToolPanelWidth="100px"
HyperlinkTarget="_Blank"
EnableDatabaseLogonPrompt="False"
EnableParameterPrompt="False"
HasToggleGroupTreeButton="False"
HasToggleParameterPanelButton="False" />
</div>
This code will show the report:
<div style="text-align:left">
<CR:CrystalReportViewer
ID="myReport"
runat="server"
AutoDataBind="true"
HasCrystalLogo="False"
ToolPanelView="None"
ToolPanelWidth="100px"
HyperlinkTarget="_Blank"
EnableDatabaseLogonPrompt="False"
EnableParameterPrompt="False"
HasToggleGroupTreeButton="False"
HasToggleParameterPanelButton="False" />
</div>