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.
Unfortunately, activation email could not send to your email. Please try again.

Angular ReportViewer - set report object properties dynamically

Thread ID:

Created:

Updated:

Platform:

Replies:

119633 Jul 16,2015 06:25 AM Jul 20,2015 05:59 AM JavaScript 1
loading
Tags: ejReportViewer
Vic Alfred Inting
Asked On July 16, 2015 06:25 AM

I'm trying to integrate reportviewer onto our reporting, which currently lists multiple reports and parameters (date, location, employee, etc.).

Is it possible to change the report objects on the fly and render the report again? This is specifically for the Angular ReportViewer.

Thanks!

Soundara Rajan S [Syncfusion]
Replied On July 20, 2015 05:59 AM

Hi Vic,

Thanks for using Syncfusion products.

You can able to change the reportviewer angular scope values while changing the dropdown options as shown in below code snippet,

<script type=”text/javascript”>

angular.module('syncApp', ['ejangular']).controller('angularReportViewer', function ($scope) {

$scope.samplevalue = '/api/ReportApi';

$scope.path = '~/ReportTemplate/TestReport1.rdl';

$scope.mode = ej.ReportViewer.ProcessingMode.Remote;

});

$("#dd1").change(function (args) {

var _index = $("#dd1 option:selected").index() + 1;

var scope = angular.element(document.body).scope();

scope.$apply(function () {

scope.path = '~/ReportTemplate/TestReport' + _index + '.rdl';

});

});

</script>



For your reference, we have prepared sample based on this and it can be downloaded from below location,
http://www.syncfusion.com/downloads/support/forum/119633/AngularDemo-1508919695.zip

Please let us know, if you have any concerns.

Regards,
Soundara Rajan 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.

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.

;