I'm passing parameters as stated in: http://www.telerik.com/support/kb/reporting/report-viewers/programmatic-initialization-of-report-parameter-values-in-telerik-reporting-silverlight-viewer.aspx
And trying to grab them in the server this way, but I get only null values. which is the correct way to do this ?
public PrintReport()
{
InitializeComponent();
this.ReportViewer1.RenderBegin += new Telerik.ReportViewer.Silverlight.RenderBeginEventHandler(ReportViewer1_RenderBegin);
}
void ReportViewer1_RenderBegin(object sender, Telerik.ReportViewer.Silverlight.RenderBeginEventArgs args)
{
args.ParameterValues["ObjectTypeId"] = 40;
args.ParameterValues["Page"] = 1;
args.ParameterValues["PageSize"] = 10;
}
And trying to grab them in the server this way, but I get only null values. which is the correct way to do this ?
public partial class ObjectInstancesReport : Telerik.Reporting.Report
{
public ObjectInstancesReport()
{
InitializeComponent();
var objectTypeId = this.ReportParameters["ObjectTypeId"].Value == null ? 40 : (int)this.ReportParameters["ObjectTypeId"].Value;
var searchText = (string)this.ReportParameters["SearchText"].Value;
var page = this.ReportParameters["Page"].Value == null ? 1 : (int)this.ReportParameters["Page"].Value;
var pageSize = this.ReportParameters["PageSize"].Value == null ? 20 : (int)this.ReportParameters["PageSize"].Value;
{
public ObjectInstancesReport()
{
InitializeComponent();
var objectTypeId = this.ReportParameters["ObjectTypeId"].Value == null ? 40 : (int)this.ReportParameters["ObjectTypeId"].Value;
var searchText = (string)this.ReportParameters["SearchText"].Value;
var page = this.ReportParameters["Page"].Value == null ? 1 : (int)this.ReportParameters["Page"].Value;
var pageSize = this.ReportParameters["PageSize"].Value == null ? 20 : (int)this.ReportParameters["PageSize"].Value;