RadzenSSRSViewer displays a report created in SQL Server Reporting Services (SSRS).
This documentation covers SSRS report display with required ReportName and ReportServer properties, parameter passing via Parameters collection, proxy support with UseProxy for secured/internal report servers, and credential configuration using OnHttpClientHandlerCreate partial method or direct HttpClientHandler.Credentials setup.
To display a report you should specify:
<RadzenSSRSViewer ReportName="Untitled" ReportServer="http://myserver/ReportServer/" />
Often SSRS reports have parameters. You can specify those via the Parameters collection:
<RadzenSSRSViewer ReportName="Untitled" ReportServer="http://myserver/ReportServer/">
<Parameters>
<RadzenSSRSViewerParameter ParameterName="Param1" Value="1" />
<RadzenSSRSViewerParameter ParameterName="Param2" Value="2" />
</Parameters>
</RadzenSSRSViewer>
Often your report server won't be exposed to the public Internet or you would want to either hide report parameters or provide security credentials. In this case you can use the built-in proxy support in RadzenSSRSViewer.
To enable it set the UseProxy property to trueand add the ReportController class below to your Blazor application.
<RadzenSSRSViewer UseProxy="true" ReportName="Untitled" ReportServer="http://myserver/ReportServer/">
<Parameters>
<RadzenSSRSViewerParameter ParameterName="Param1" Value="1" />
<RadzenSSRSViewerParameter ParameterName="Param2" Value="2" />
</Parameters>
</RadzenSSRSViewer>
To provide user credentials when making the proxy requests you can implement the OnHttpClientHandlerCreate partial method of ReportController.
ReportController.Credentials.csOnHttpClientHandlerCreate partial method:
using System.Net;
using System.Text;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Mvc;
public namespace YourAppNamespace.Controllers
{
public partial class ReportController
{
void OnHttpClientHandlerCreate(ref httpClientHandler);
{
httpClientHandler.Credentials = new NetworkCredential("username", "password", "domain");
}
}
}
Alternatively you can set the Credentials property of httpClientHandler directly in the CreateHttpClient method of the
ReportController class:
private HttpClient CreateHttpClient()
{
var httpClientHandler = new HttpClientHandler();
httpClientHandler.AllowAutoRedirect = true;
httpClientHandler.UseDefaultCredentials = true;
// Set the credentials
httpClientHandler.Credentials = new NetworkCredential("username", "password", "domain");
if (httpClientHandler.SupportsAutomaticDecompression)
{
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
}
OnHttpClientHandlerCreate(ref httpClientHandler);
return new HttpClient(httpClientHandler);
}
In some setups authenticating the request like this could fail with exceptions such as:
HttpRequestException: Authentication failed because the connection could not be reused.. If this happens check this forum threadSystem.ComponentModel.Win32Exception (0x80090302): The function requested is not supported. If this happens check this forum threadRadzen Blazor Components, © 2018-2025 Radzen.
Source Code licensed under
MIT