We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ReportViewer and Report Parameters issues

We are currently working on latest release of the sync-fusion controls. We are trying to pass parameters to the Report at runtime and display parameter value on the Report.

For example, we have designed rdlc. Added ReportParameters in that RDLC. Now, we have taken one textbox to display that value in the parameter. We are passing the value of the parameter using textbox at Run time. How can we achieve this?

On button click, we do as shown below:
ReportParameter reportParam = reportViewer1.reportObject.ReportParameters[0];
ParameterValue paramValue = new ParameterValue();
paramValue.Value = Convert.ToString(textBox1.Text);
paramValue.Label = "ParamTerritoryID";
ParameterValues paramValues = new ParameterValues();
paramValues.Add(paramValue);
ValidValues vv = new ValidValues();
vv.ParameterValues = paramValues;
reportParam.MultiValue = false;
reportParam.ValidValues = vv;
reportViewer1.reportObject.ReportParameters[0] = reportParam;
this.reportViewer1.Refresh();

Is this appropriate way to display parameter value on report? or we should go through other way?

1 Reply

SU Suriya Syncfusion Team April 21, 2010 02:23 PM UTC

Hi Atul,

Thanks for your interest in Syncfusion products.

The Report Parameter support in Essential Report Viewer control is currently not supportted for RDL/RDLC files.

Currently, we have QueryParameters support for RDL reports.

The Report Definition types and its properties available in the control are for control's internal purposes only, kindly refrain from using it.

Please let us know if you need some more details.

Thanks,
Suriyaprakasam

Loader.
Live Chat Icon For mobile
Up arrow icon