How to add a watermark to my RDLC report programmatically under some condition (based on passed parameter)?
overTimeReport.ReportPath = "Report\\OverTime.rdlc";
overTimeReport.DataSources.Clear();
overTimeReport.Refresh();
//---- Generate parameter list----
List<ReportParameter> paramList = new List<ReportParameter>();
ReportParameter param1 = new ReportParameter("check_state", check_state);
paramList.Add(param1);
overTimeReport.SetParameters(paramList);
ReportDataSource datasource = new ReportDataSource();
datasource = new ReportDataSource("DSOverTime", dt);
Set background image for report body to your watermark image parameter:
Set your conditional watermark parameter based on your "condition" (I assume your condition would either show watermark or not):
Don't forget to add your watermark parameter to parameters list and enable external images in the report: