Search code examples
javascriptangularjscrystal-reports

How to pass data or object by window.open


I need pass data or object (Criteria) from AngularJS to Crystal Report Viewer in asp.net Web

AngularJS Code:

$scope.OnPrint = function() {
 $window.open('http://localhost:89/', '_blank');
};

Thank.


Solution

  • Use the query string:

    $scope.OnPrint = function() {
     var param1 = '192';
     var param2 = 'userReport';
     $window.open('http://localhost:89/?param1=' + param1 + '&param2=' + param2, '_blank');
    };