Search code examples
c#asp.netdevexpressreportingxtrareport

DevExpress XtraReports - Master and sub report both with stored proc


I am currently using the latest version of XtraReports to make a master and sub report that both call stored procs. The master works fine, but for some reason the sub isn't pulling data even though it's passing the correct parm and I know the proc works. According to the information I found on their website I should be doing a BeforePrint on the subreport to bind the dataadapter. On the Design view of the report I have the DataSource set and the DataMember set and left the dataadapter set to none. Then in the beforeprint I have the following -

private void SubReport_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
    {

        sp_StoredProcTableAdapter da = new sp_StoredProcTableAdapter();
        this.DataAdapter = da.Fill(dsGoalsTotal1.sp_StoredProc, "name");            
    }

It hits this and pulls data, but it's not binding it to the report. Any ideas? Thanks


Solution

  • Try to use: this.DataSource=dsGoalsTotals.sp_StoredProc;

    After the code you sent.

    it might help.