Reputation: 1
I have a Report which has 2 sub Reports in which the main Report parameter is linked to sub Report Parameter
When I am passing parameter to the main Report from C# Code, I am getting the following .Net error:
Operation illegal on Linked Parameter
Can anyone please share me C# code?
cryRpt.Load(Server.MapPath("~/ProjectBillingGrid_Report.rpt"));
cryRpt.SetParameterValue("@PortfolioID", PortfolioID);
cryRpt.SetParameterValue("@ProjectID", 0);
cryRpt.SetParameterValue("@SubProjectID", 0);
cryRpt.SetParameterValue("@FYID", FYID);
cryRpt.SetParameterValue("@UserRole",1);
cryRpt.SetParameterValue("@EmployeeID",null);
cryRpt.SetParameterValue("@IsExcludeSubProject",false);
cryRpt.SetParameterValue("@SearchText",null);
CrystalReportViewer1.Visible = true;
Session["ReportSource"] = cryRpt;
Upvotes: 0
Views: 837
Reputation: 4001
Make sure none of the parameters you are setting values for is a linked parameter. Such parameters get their values from the main report and hence, cannot be set in code.
Upvotes: 1