New to Telerik Reporting? Download free 30-day trial

How to Set the Height and Width of the Blazor Report Viewer

Environment

Product Version 14.1.20.618
Product Progress® Telerik® Reporting

Description

This article describes how to set the height and width of the ReportViewer component.

Solution

The Blazor Report Viewer is nested inside a div element and will resize itself based on the div's width and height. The article How to Use Blazor Report Viewer demonstrates one possible approach: a style element with the following code:

<style>
    #rv1 {
        position: relative;
        width: 1200px;
        height: 600px;
    }

</style>

Depending on your application's requirements, you can adjust the position, for example:

<style>
   #rv1 {
            width: 85%;
            height: 90%;
            position: absolute;
        }
</style>

This solution represents only one of many possible answers that depend on the page's DOM and other CSS configuration.

In this article