SAP Knowledge Base Article - Public

1198279 - Text objects are not aligned when viewing in .NET CrystalReportViewer

Symptom

Crystal Reports for Visual Studio .NET is the reporting development tool for a .NET application. The report contains several text objects with the underline effect enabled. Some of them are empty text objects.

The text objects are aligned when viewing them in .NET CrystalReportViewer using Internet Explorer (IE) with the default text size.

However, after changing IE's text size to Larger or Largest, the text objects are not aligned when viewing in .NET CrystalReportViewer.

Cause

This behavior occurs because when there are multiple design rules on an object, the nearest rule takes effect first. Often the nearest rule is a customized rule.

In this case, a text object has the font size defined by the text object default formatting (nearest rule) and the IE text size (second nearest rule).

The font size doesn't change with IE because the nearest rule takes precedence. However, when there is no text in the text object, the IE text size rule applies. The text object itself will change size. This is why the text objects are not aligned when some of them are empty text objects.

Resolution

This behavior is by design.

To work around the behavior, add a space character to the empty text objects. The alignment will then not be an issue.

Keywords

Text objects aligned CrystalReportViewer Text Size Larger Largest , 3673027 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports XI ; SAP Crystal Reports XI R2 ; SAP Crystal Reports, version for Visual Studio .NET 2005 ; SAP Crystal Reports, version for Visual Studio .NET 2008 ; SAP Crystal Reports, version for Visual Studio .NET 9.1