Microsoft Report Viewer Having Sub Reports RRS feed

  • Question


    Hi All ,

    I have a Report Viewer (.rdlc ) file

    This has a Table  Which needs to be filled with Data From "TABLE A" and "TABLE B"

    Data for "TABLE A" will take a parameter from Front end  , but "TABLE B" will take a parameter from "TABLE A"

    created a Dataset for "TABLE A" and a DataSet for "TABLE B".

    In the Table I Placed a Sub Report , Which will have Data from "TABLE B".( Which take parameter from Main Report i.e a value from "TABLE A")

    getting problem for  Sub Report .

    How to get the value from Main Report and pass the parameter to DataSet of "Table B".

    ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(SubReport);

    the above line is not getting fired for me when i debug VS 2005 , i do have a Method Called SubReport 

      public void SubReport(object sender, SubreportProcessingEventArgs e)

            int SSID = Int32.Parse(e.Parameters["SSID"].Values[0]);  // trying to retrive the value to be passed to SubReport from Main Report.

                ds2 = SqlHelper.ExecuteDataset(thisConnection, "DataSetForTableB", SSID);
                if (ds2.Tables[0].Rows.Count != 0)
                    e.DataSources.Add(new ReportDataSource("DataSetName", ds2.Tables[0]));


    SubreportProcessingEventHandler is not getting fired .

    able to display data for Just "TABLE A" , but once having  Sub Report , how to retrive the Paameter value from Main Report and Passs it to Sub Report.

    any Suggestion Plz...



    Monday, December 22, 2008 12:52 PM