I am using HTML5 Web Form REST Telerik Reporting Q1 2017. When setup the first report which is using the wizard the report and parameter working properly.
However when I tried to pass the parameter from Querystring (from other web form) the report parameter becomes Null.
Please help me, What is the best workaround or solution for this issue?
=======================================================================
On the Page_Load report viewer I get the value from Querystring :
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
RptQuot1 report = new RptQuot1(Request.QueryString["Parameter1"] as string);
}
}
On the report constructor I added the parameter "Parameter1"
public RptQuot1(string parameter1)
{
InitializeComponent();
this.DataSource = null;
this.ReportParameters["Parameter1"].Value = parameter1;
}
Also on that class I added the NeedDataSource event handler :
public void RptQuot1_NeedDataSource(object sender, System.EventArgs e)
{
Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
this.sqlDataSource1.Parameters[0].Value = report.Parameters["Parameter1"].Value;
report.DataSource = this.sqlDataSource1;
}