RadzenSSRSViewer Evaluation

We are in the process of evaluating Blazor Component vendors. Our current ASP.Net application makes heavy use of the Microsoft SSRS ReportViewer Control, so we were immediately drawn to the RadzenSSRSViewer control as a replacement.

Here are the steps we took for the evaluation.

  1. We created a simple app using the RadZen app builder. The app consisted of one Blazor page with a RadzenSSRSViewer control on it.
    Use Proxy set to yes
    Report Server and Report Name set
    Parameters added

  2. We generated the solution using the Radzen App builder, then loaded it into Visual Studio
    Configuration Params above were stored in main.json

  3. In the ReportController.cs file we set our login credentials (after having to reasearch a lot about this in your blog):
    OnHttpClientHandlerCreate (ref HttpClientHandler handler)
    set our Specific access credentials:
    httpClientHandler.Credentials = new NetworkCredential("our_username","our_password","our_domain")

  4. We ran the Blazor application, and the report initially renders as expected.

Issues:

  1. We need to be able to hide the Parameter Panel - This cannot be exposed to our customers, and were unable to do so
    We tried updating the requestMessage.RequestUri.OriginalString to add "&rv:ParamMode=Hidden&" toggle, but this did not work
    OnReportRequest(ref HttpRequestMessage requestMessage)
    string uriStr = requestMessage.RequestUri.OriginalString;
    uriStr = uriStr.Replace("&rs:Embed=true", "&rv:ParamMode=Hidden&rv:Toolbar=None&rv:HeaderArea=None&rs:Embed=true");
    requestMessage.RequestUri = new Uri(uriStr);

  2. Drilling down to other Reports via SSRS "Actions" triggers an exception in ReportController.cs
    FormatException: Input string was not in a correct format.

System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
int.Parse(string s)
SecondRadZenApp.Controllers.ReportController.WriteResponse(HttpRequest currentReqest, string url, HttpResponseMessage responseMessage, HttpResponse response, bool isAjax) in ReportController.cs
{
delimiterIndex = result.IndexOf("|", index);
if (delimiterIndex == -1)
{
break;
}

length = int.Parse(result.Substring(index, delimiterIndex - index));

  1. We need a dynamic way to set parameters and report names - our reports are application driven and need to be very dynamic from a Report Name and Parameter perspective (both the number of Params and their values)
    We were able to replace parameters by modifying the raw query string, but this is not an optimal solution
    OnReportRequest(ref HttpRequestMessage requestMessage)
    string uriStr = requestMessage.RequestUri.OriginalString;
    uriStr.Replace("2018", "2017");
    requestMessage.RequestUri = new Uri(uriStr);

  2. What we were hoping for was the ability to interact with the RadzenSSRSViewer in the @code area of a .razor file containing the RadzenSSRSViewer:

@foreach (var param in _params) { }

@code{
string _reportName;
string _reportServer;
List _params = new List();
}

protected override async Task OnInitializedAsync()
{

// Set _reportName
// set _reportServer
// load _params

}

Is this approach possible, and if so is there a sample application showing this approach? We are also not able to get any of the ReportController functions to fire trying this (in our standalone app not generated by RadZen).

Any help greatly appreciated.

This was removed from our original post - issue #4:

           <RadzenSSRSViewer ReportName=@_reportName ReportServer=@_reportServer UseProxy="true">
                <Parameters>
					@foreach (var param in _params)
					{
						<RadzenSSRSViewerParameter ParameterName=@param.Name Value=@param.Value />						
					}					
                </Parameters>
            </RadzenSSRSViewer>

@code{
string _reportName;
string _reportServer;
List _params = new List();
}

protected override async Task OnInitializedAsync()
{

// Set _reportName
// set _reportServer
// load _params

}

I think you have to use rc parameters as rv are for the SharePoint version of the report viewer. More info is available here: URL access parameter reference - SQL Server Reporting Services (SSRS) | Microsoft Learn

We are not aware of this exception. Probably the proxy code doesn't handle some response. You can either try without a proxy or check with the debugger why it happens - the complete source of the proxy is included in the generated code.

This approach should be possible as changing the Name or Value of a parameter invokes the Reload method of the report viewer which renders it again with the new URL.

Unfortunately not. To the best of our knowledge there isn't any public hosted SSRS which we could use for a demo. Also hosting one ourselves turned out to be unfeasible.

1 Like

We were able to finally get the RadzenSSRSViewer working in our standalone blazor application (.Net 5.0 switching over to WinHttpHandler for socket security issues, etc.) , but we still have issues with drilling down on reports within the RadzenSSRSViewer control.

  1. We were able to fix the crash in the ReportController.cs file that occurred when drilling down to another report by adding the check below for the document type in WriteResponse() . When you click to navigate to another report, the page is resubmitted and is done so within an ajax event. The page happens to contain "|" characters within javascript code, so it generates an exception trying to convert what it assumes is a delimited int.
    //if (isAjax && result.IndexOf("|") != -1)
    if (isAjax && result.IndexOf("|") != -1 && (result.Contains("") == false))

  2. Report Navigation actions (hyperlinks) within the RadzenSSRSViewer control are all replaced with the original Report URL - so when clicking to drill down to a report, it always brings up the original report. This is a requirement for us, as we need to be able to navigate to other reports via the Radzen Control.

  3. When mousing over the munged "ssrsproxy" action hyperlink in the RadzenSSRSViewer control, all parameters are exposed in the query string when the url is shown in the browser status bar. This is a security issue for us, as we pass encryption keys to sensitive data as report parameters and do not want this exposed to the end user. The Microsoft ASP.Net ReportView control does not do this.

We will provide a very simple SSRS report (no DB connection required) that demonstrates these drilldown issues. Please let us know how to send this report to you. We like the SSRS control and your other components, but need to resolve these issues to move to the next steps.

Thanks,

Dan

1 Like

Hi @dan_neff,

We don't have plans to extend the report controller any further at this point. As you have seen it is 99% of the ReportViewer implementation. It originally started as a way to "hide" report parameters. We realise it is nowhere near complete proxy implementation however we also believe it is close to impossible to implement it properly without having any understanding how the MS report viewer actually works. This is as far as we want to get with it blindly. Feel free to customize the report controller per your requirements - for example replace any sensitive data you don't want to appear in the browser.