Dennis Martinez
Report Drillthrough event not working!
By Dennis Martinez in Reports using C# on Jan 20 2011
  • Dennis Martinez
    Jan, 2011 20

    I am quering a FileMaker server via ODBC with Visual Studio 2008 and dabbing on making reports from the data in one Database of the server.  This is my first time working in Visual Studio and C#  so please be patient with me.  The reporting capabilites of Visual Studio is much more advanced than FileMaker, the aggregate functions are much easier to implement in Matrix and Tables...  Anyways I have a report on the first page pulls the Data from the table and the Matrix is populated.  I then want to jump to another report with Data from another Table and pull over some parameters based off the first report.  I have used the "JUMP TO" in the report .rdlc file from the first report and supplied the parameters...  When I create a dummy second report with just textboxes and display the parameters I see the values correctly.  Now I add a Matrix to the second report and I get "A data source instance has not been supplied..."  So I then added code to initiate the Report.Drillthrough event to pass the dataset table to the drill down report.  And now I get "Some parameters or credentials have not been supplied"  but I know the parameters are getting passed when I debugging I can see the 5 parameters that I need for the second report.  Here is my code:

    private void HoldsPerLocations_Load(object sender, EventArgs e)

    {

    // TODO: This line of code loads data into the 'dataSet1.BillingPackets' table. You can move, or remove it, as needed.

    this.billingPacketsTableAdapter.Fill(this.dataSet1.BillingPackets);

    // Here we pass on the Report Paramter to filter the Data from the DataSet

    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { StartDate, EndDate, Office });

    // TODO: This line of code loads data into the 'dataSet1.BIP_Holds' table. You can move, or remove it, as needed.

    this.bIP_HoldsTableAdapter.Fill(this.dataSet1.BIP_Holds);

    //Trying to make Drilldown

    reportViewer1.Drillthrough += new DrillthroughEventHandler(reportViewer1_Drillthrough);

    this.reportViewer1.RefreshReport();

    }

    public void reportViewer1_Drillthrough(object sender, DrillthroughEventArgs e)

    {

    LocalReport localReport = (LocalReport)e.Report;

    localReport.DataSources.Add(new ReportDataSource("BillingPacket", dataSet1.BillingPackets));

    reportViewer1.RefreshReport();

    }

    private void reportViewer1_Load(object sender, EventArgs e)

    {

    }

    }

     

    • 0

Most Popular Job Functions


MOST LIKED QUESTIONS