- When a text field is truncated to display less than what it actually contains, a second text field placed to the right of the first field is overlapped by the first field.
- This works well in the Crystal Reports Designer, but overlaps in the Crystal Reports DHTML viewer.
Reproducing the Issue
- Create a report.
- Add to the designer 2 string fields with long text values.
- Decrease the 1st field to the point that text will be truncated (e.g.; The string will be as: "The fox jumped very high". Resize the field to "The fox jumped".
- Preview the report in the designer. In the CR designer preview you see "The fox jumped very", with no overlap of the text field next to it.
- Save Report.
- Display the report in a web app.
- The "The fox jumped very" field overlaps the text field next to it.
- Crystal Reports 2008 SP2
- Visual Studio .NET 2003, 2005, or 2008
- .NET Web application
- The .NET WebForms CrystalReportViewer requires knowledge of the client-side screen DPI to properly compose reports.
- When the screen resolution is set to 120 DPI, text fields will overlap.
There are two possible solutions to the issue:
Set the display resolution to 96 DPI.
Redirecting to viewer…
<div id="dpi" style="height: 1in; left:-100%; position: absolute; top:-100%; width: 1in"></div>
window.location = "Viewer.aspx?dpi=" + document.getElementById("dpi").offsetHeight;
- Then in the Viewer.aspx page, retrieve this value and specify the DPI for the viewer:
protected void Page_Load(object sender, EventArgs e)
int dpi = Convert.ToInt32(Request["dpi"];
CrystalReportViewer1.RenderingDPI = dpi;
- This is considered to be a permanent solution and there are no further fixes planned for this issue.
KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem