We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Parameter values are not shown for SSRS rdl report viewed in ReportViewer

Thread ID:

Created:

Updated:

Platform:

Replies:

143310 Mar 13,2019 12:29 PM UTC Mar 14,2019 09:03 AM UTC ASP.NET Core 1
loading
Tags: ReportViewer
Dheeraj Rao
Asked On March 13, 2019 12:29 PM UTC

Am new to ReportViewer and trying to render a rdl in reportviewer to analyize if we want to go ahead with the product.

Am using SSRS rdl report with parameter values got from a query, which when ran on report builder works fine but when the report is viewed in ReportViewer the parameter doesn't show any values and is greyedout, Do I need to define in code the values for the parameter which already exists in the report? If so how do I do that?

I would rather show reports from SSRS report server but would like to see how this works as well. For this I opened anotehr thread.

Thank you.
Dheeraj

Mahendran Shanmugam [Syncfusion]
Replied On March 14, 2019 09:03 AM UTC

Hi Dheeraj, 

We can pass the parameter using the “report-loaded” event in ASP.NET Core application as shown in below code snippet. 
Index.cshtml 
<div style=" align-items:center; height:525px;width: 100%;"> 
    <ej-report-viewer id="reportviewer1" report-service-url="../Home" report-loaded="onReportLoaded" report-path="/ReportsTemplate/Sales Order Detail.rdl" processing-mode="Remote" /> 
</div> 
 
<script type="text/javascript"> 
 
    function onReportLoaded(sender) { 
        var reportObj = $('#reportviewer1').data("ejReportViewer"); 
        reportObj.model.parameters = [{ 
            name: 'SalesOrderNumber', 
            labels: ['SO50752'], 
            values: ['SO50752'], 
            nullable: false 
        }]; 
    } 
 
</script> 

We have prepared the simple sample for your reference and it can be downloaded from below location. 

Please let us know if you need any clarification. 

Regards, 
Mahendran S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;