Ask a questionAsk a question
 

General DiscussionHow to Make sub report using C#.NET

  • Friday, August 28, 2009 3:51 PMShiv Ratan Kumar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi all,

       I trying to make report using Window Form using C#.NET. But Individually Reports working properly but when i m trying to add subreport with main report its showing this error : "Error: Subreport could not be shown".
    I checked Many Fourms but non of where i find the solution.
    Can Any one explain How to make a Report with Subreport and parameters using C#.NET

     

    public Form1()

    {

    InitializeComponent();

     

    this.reportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing);

    }

     

    void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)

    {

    e.DataSources.Add(

    new ReportDataSource("OrderDetailsDataSet_OrderDetails", OrderDetailsDataSet.Tables[0]));

    }

    Thanks
    Sameer
    South America