asp.net mvc 4 - how to pass parameter to telerik Report using MVC 4 vs 2012 -
i want pass log ind person id parameter telerik report q1 2013 using mvc 4 vs 2012.and don't want send parameter through ui parameter. have done on aspx view is
<script runat="server"> public override void verifyrenderinginserverform(control control) { // avoid server form (<form runat="server"> requirement } protected override void onload(eventargs e) { base.onload(e); var report = new immunizationrpt(); var instancereportsource = new telerik.reporting.instancereportsource(); instancereportsource.reportdocument = report; report.reportparameters.add("patientkey",telerik.reporting.reportparametertype.integer, 1); reportviewer1.reportsource = instancereportsource; reportviewer1.refreshreport(); } </script>
but report shows record.it not getting filter record.
my report showing records, because hadn't set report filter records based on parameter value. achieve that, first need add new parameter code behind (as did) , need add new filter shown in following code:
telerik.reporting.filter filter1 = new telerik.reporting.filter(); filter1.expression = "=fields.patientkey"; filter1.operator = telerik.reporting.filteroperator.equal; filter1.value = "=parameters.patientkey.value"; report.filters.add(filter1);
Comments
Post a Comment