Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

ReportBook get parameters from request

$
0
0

Hello,

I have a question regarding ReportBook. I send a request like that in JS after a click on a button : 

.telerik_ReportViewer({
    serviceUrl: apiUrl,
    templateUrl: reportUrl,
    reportSource: {
        report: "Reports.Controlling.Controlling, Reports",
        parameters: params
    }
});

 

In an standard report I can access parameters with this line : 

var report = (Report)sender;
var parameter1 = Convert.ToInt32(((object[]) (report.Parameters[BusConstants.ParamOfferId].Value))[0]);

Now I want to do the same with a reportBook. For example, get the paramters and do that : 

if(parameter1)
    Reports.Add(new RegionRevenue(parameter1));
else
{
    Reports.Add(new ProductPartCosts(parameter2));
    Reports.Add(new ServicePerformanceCostReport());
     
}
 

Is it possible (to get parameters the same way and use them to instanciate books) ? Cause I've seen this thread and I think that's not possible : http://www.telerik.com/forums/reports-with-document-map-excel-sheet

Thank you for your help.

Mathieu


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>