Passing Parameters to subreport in ASP.Net
My main report has a detail section that contains a subreport. We are wanting to see all parts for a given customer with a good bit of detail for each part (hence the subreport instead of a list). I need to find a way to pass the part number from a dataset in the main report as a parameter to the subreport. I am using ObjectDataSources, because I am having to get my data from an Informix database using stored procedures (Informix stored procs do not return column names and this blows RS's mind). Are there any examples of what I am trying to accomplish? Below is the code from my SubReportProcessing Event. Any help is greatly appreciated.
PrivateSub MySubReportProcessing( _
ByVal senderAsObject,ByVal eAs SubreportProcessingEventArgs)ds =New ObjectDataSource()
ds.ID ="dsGetPartInformation"
ds.SelectMethod ="GetPartInformation"
ds.TypeName ="ReportData"
ds.SelectParameters(0) =New WebControls.Parameter(e.Parameters(0).ToString)ds.SelectParameters(1) =New WebControls.Parameter(e.Parameters(1).ToString)e.DataSources.Add(New ReportDataSource("dsGetPartInformation", ds.ID))ds =New ObjectDataSource()ds.ID ="dsGetActualForecastWeight"
ds.SelectMethod ="GetActualForecastWeight"
ds.TypeName ="ReportData"
ds.SelectParameters(0) =New WebControls.Parameter(e.Parameters(0).ToString)ds.SelectParameters(1) =New WebControls.Parameter(e.Parameters(1).ToString)e.DataSources.Add(New ReportDataSource("dsGetActualForecastWeight", ds.ID))ds =New ObjectDataSource()
ds.ID ="dsGetActualUsageWeight"ds.SelectMethod ="GetActualUsageWeight"ds.TypeName ="ReportData"ds.SelectParameters(0) =New WebControls.Parameter(e.Parameters(0).ToString)ds.SelectParameters(1) =New WebControls.Parameter(e.Parameters(1).ToString)e.DataSources.Add(New ReportDataSource("dsGetActualUsageWeight", ds.ID))ds =New ObjectDataSource()
ds.ID ="dsGetReportMOH"ds.SelectMethod ="GetReportMOH"ds.TypeName ="ReportData"ds.SelectParameters(0) =New WebControls.Parameter(e.Parameters(0).ToString)ds.SelectParameters(1) =New WebControls.Parameter(e.Parameters(1).ToString)e.DataSources.Add(New ReportDataSource("dsGetReportMOH", ds.ID))EndSubThanks,
Jeremy

