Hi Karmen,
Sorry for the inconvenience.
Yes, you have to set the parameter values before the Save() method in report writer to update the default parameter values. Please let us know if you require further assistance on this.
Regards,Vinoth S.
IList<ReportParameter> parameters = new List<ReportParameter>();
foreach (var parameter in reportWriter.GetParameters())
{
ReportParameter param = new ReportParameter();
param.Name = parameter.Name;
param.Values.Add("Ottawa");
parameters.Add(param);
}
reportWriter.SetParameters(parameters); |
reportWriter.SetParameters(parameters as IEnumerable<ReportParameter>); |
Hi Abelardo,Can you confirm whether the below sample runs fine on your side,In the above sample, we have passed the IList to IEnumerable collection only but we didn’t get any conversion error. Please find the snippet used,
IList<ReportParameter> parameters = new List<ReportParameter>();foreach (var parameter in reportWriter.GetParameters()){ReportParameter param = new ReportParameter();param.Name = parameter.Name;param.Values.Add("Ottawa");parameters.Add(param);}reportWriter.SetParameters(parameters);Otherwise typecast similar to below snippet
reportWriter.SetParameters(parameters as IEnumerable<ReportParameter>);Regards,Mageshyadav.M