Search results
Suggest a FeaturePDF

ASP.NET Core Report Viewer viewing best practices

This section explains the best practices and optimized ways to render RDL/RDLC reports in ASP.NET Core Report Viewer.

View large records in seconds

The PerformanceSetting class provides properties that allows ASP.NET Core Report Viewer to render the millions of records in seconds. Here are the properties associated with it:

  • PageCreation
  • VirtualEvaluation
  • AutoGrowText
  • FetchLimit

Note : For optimal rendering, please set the PageCreation property to OnDemand, VirtualEvaluation to true, AutoGrowText to false, and FetchLimit to 1000.

Handle page creation and processing

This PageCreation enum helps to define how each page is processed and created in the Report Viewer engine.

Property Description
Default Starts page creation, after all, pages created then sends first page to client side for rendering.
OnDemand Creates first page then sends to the client side within seconds. Each page creation starts when user navigating to the next page.
Background Creates first page then sends to the client side within seconds. Remaining pages created at the background, completion status is updated in progress bar.

Here, the example shows how to configure PageCreation in the ReportViewerController.

public void OnInitReportOptions(ReportViewerOptions reportOption)
{
    reportOption.ReportModel.PerformanceSetting = new BoldReports.RDL.Data.PerformanceSetting
    {
        PageCreation = BoldReports.RDL.Data.PageCreation.OnDemand
    };
}

You can set the PageCreation as custom property as shown below, Shows the configuration of handle page creation and processing in custom property dialog

The PageCreation property must be added to report properties.

Efficient memory management in table processing

This VirtualEvaluation reuses tablix cell object to reduce memory utilization.

public void OnInitReportOptions(ReportViewerOptions reportOption)
{
    reportOption.ReportModel.PerformanceSetting = new BoldReports.RDL.Data.PerformanceSetting
    {
        VirtualEvaluation = true
    };
}

You can set the VirtualEvaluation as custom property as shown below, Shows configuration of virtual evalution property in custom property dialog

The VirtualEvaluation property must be added to report properties.

Dynamic textbox size calculation

The AutoGrowText property is used to measure dynamic text height in each text box. Please note: if we set AutoGrowText to true, the viewer will take time to measure the height of each textbox cell, depending on the amount of data.

public void OnInitReportOptions(ReportViewerOptions reportOption)
{
    reportOption.ReportModel.PerformanceSetting = new BoldReports.RDL.Data.PerformanceSetting
    {
        AutoGrowText = false
    };
}

You can set the AutoGrowText as custom property as shown below,

Shows the configuration of auto can grow in custom property dialog

Limit the data for rendering

The FetchLimit property is used to limit the number of records fetched in a report. For instance, if a report contains huge records by applying a FetchLimit of 1000 will ensure that only 1000 records will fetched from the dataset.

public void OnInitReportOptions(ReportViewerOptions reportOption)
{
    reportOption.ReportModel.PerformanceSetting = new BoldReports.RDL.Data.PerformanceSetting
    {
        FetchLimit = 1000
    };
}

You can set the FetchLimit as custom property as shown below,

Shows configuration of enable fetch limit property in custom property dialog

Limitation

We have provided this feature for non-grouping tablix-based reports. However, there are a few limitations that are listed below.

  1. Reports featuring nested tables are not supported.
  2. Reports that include multiple tables are not supported.
  3. Cells within a Tablix must contain only text; cells with images or charts are not supported.
  4. Reports containing image-based cannot be used.
  5. Reports containing toggle item will not supported.
  6. Reports that contain sub-reports are not supported.
  7. Reports with document mapping, bookmark labels are unsupported.
  8. Sorting of table cell in the viewer is limited in functionality.
  9. Tablix structures with repeat headers will not supported.
  10. File storage cache storage settings will not supported.
  11. Tablix structures with column group will not supported.