I followed the video tutorial on creating parameterized queries for reports but i'm having trouble replicating it for SubReports.
The code for the subreport:
get { return (int)sqlDataAdapter1.SelectCommand.Parameters["@WorkOrderItem"].Value; }
set { sqlDataAdapter1.SelectCommand.Parameters["@WorkOrderItem"].Value = value; }
the code from the .aspx page:
Reports.SubReports.WOTechnicianDetails subReport = new Reports.SubReports.WOTechnicianDetails();
subReport.FK_WorkOrderParam1 = int.Parse(this.Id.ToString());
when I do it this way, the subreport gets the value I want, but it still only loads the default that I put in for the Sql Data Adapter under parameters. Am I missing a place I need to refresh the report? Any help is appreciated.
Thanks
The code for the subreport:
get { return (int)sqlDataAdapter1.SelectCommand.Parameters["@WorkOrderItem"].Value; }
set { sqlDataAdapter1.SelectCommand.Parameters["@WorkOrderItem"].Value = value; }
the code from the .aspx page:
Reports.SubReports.WOTechnicianDetails subReport = new Reports.SubReports.WOTechnicianDetails();
subReport.FK_WorkOrderParam1 = int.Parse(this.Id.ToString());
when I do it this way, the subreport gets the value I want, but it still only loads the default that I put in for the Sql Data Adapter under parameters. Am I missing a place I need to refresh the report? Any help is appreciated.
Thanks