Search results
Suggest a FeaturePDF

Report measurement options

Report measurement options used to improvise the appearance of report in rendering and export outputs.

Improve text rendering in view and export

ASP.NET Core Report Viewer provides the property MeasureTextOption that helps to include following improvements in text rendering,

  • Produces identical text sizes in view and export output.
  • Improves rendering performance.
  • Eliminates text overlaps.
  • Allows to measure text with user-defined or custom fonts.

To enable the above benefits, set the MeasureTextOption property value to PdfFont in OnInitReportOptions of Report Viewer Web API controller as shown in below code snippet.

```csharp
[NonAction]
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
  reportOption.ReportModel.MeasureTextOption = MeasureTextOptions.PdfFont;
}
```

The above measurement option uses the custom fonts added in the reportOption.ReportModel.PDFOptions.Fonts collection.

Improve report items layouting and pagination

When the RoundLayoutMeasures property is false, all non-integral values that are calculated during the report processing are rounded to whole pixel values. It provides following improvements,

  • Report text rendered without cuts.
  • Eliminates extra blank pages.
  • Removes item and text overlaps.
  • Eliminates the blur semi-transparent edges that are produced by anti-aliasing.
  • Produces identical look in report view and export output.

To enable the above benefits, set the RoundLayoutMeasures property value to false in OnInitReportOptions of Report Viewer Web API controller as shown in below code snippet.

```csharp
[NonAction]
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
  reportOption.ReportModel.RoundLayoutMeasures = false;
}
```