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

Need to add Report parameters to my report for filtering the data

Thread ID:





124343 Jun 2,2016 04:53 AM UTC Jun 2,2016 11:31 AM UTC JavaScript 1
Tags: ejReportViewer
Hougth Trading
Asked On June 2, 2016 04:53 AM UTC

Hi, I am working on integration of ReportViewer using angularjs module. After a lot of struggle i made it working with my code. But now i want to integrate filter parameters in the report using report parameters so that i could filter the report. I tried adding parameters in client end as well as in web api. Please let me know the solution for the same. I have attached a screenshot what i want in my report.

Attachment: Capture_52d5aaaf.zip

Yuvaraj Devarajan [Syncfusion]
Replied On June 2, 2016 11:31 AM UTC

Hi Hougth, 
Thanks for contacting Syncfusion support. 
We can set the parameter values to report through ReportViewerOptions in WebAPI side. The ReportViewer has parameter property that is the list of report parameter type to add collection of report parameter to it in server side (WebAPI) and also in client side (JS) as shown in below code example.   

public void OnInitReportOptions(ReportViewerOptions reportOption) 
            List<ReportParameter> parameters = new List<ReportParameter>(); 
            parameters.Add(new ReportParameter() { Name = "SalesYearParameter", Labels = new List<string>() { "2003" }, Values = new List<string>() { "2003" } }); 
            reportOption.ReportModel.Parameters = parameters; 
<script type="text/javascript"> 
        angular.module('syncApp', ['ejangular']).controller('ReportController', function ($scope) { 
            $scope.report = true; 
            $scope.samplevalue = 'http://' + window.location.host + '/api/ReportApi'; 
            $scope.path = '~/Report/Sales Dashboard.rdl'; 
            $scope.mode = ej.ReportViewer.ProcessingMode.Remote; 
            $scope.parameters = [{ 
                name: 'SalesYearParameter', 
                labels: ['2003'], 
                values: [2003] 
We have prepared the sample and it can be downloaded from below location, 

Please refer the below UG documentation for more information, 

Yuvaraj D 


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