none
Report Viewer RRS feed

  • Question

  • Hi,

    I am creating a Testing and Tagging Logging application and I would like to create a report once I am done testing.

    Is there some way to pass parameters to the report to "filter" the data by customer.

    Please note that I have 3 tables Customers which is linked to Products which is linked to TaggingDetails.

    Can someone please provide some code or a tutorial that explains this,

    Cheers,

    Ben

    • Moved by CoolDadTx Friday, June 8, 2012 2:01 PM Reporting related (From:Visual C# General)
    Friday, June 8, 2012 6:27 AM

All replies

  • You need to create a collection of ReportParameters and add them to the LocalReport which I believe can be accessed on the ReportViewer Control:

                ReportParameter[] reportParameters = newReportParameter[]
                                        {
                                            newReportParameter("customerId", cunstomerId)
                                        };
                LocalReport.SetParameters( m_ReportParameter );

    You then need to add the parameter to the RDLC report (in the report designer) and set the type it's expecting.

    Chris

    Friday, June 8, 2012 1:12 PM
  • What Report framewok is being used here, I'm unfamiliar with RDLC.

    JP Cowboy Coders Unite!

    Friday, June 8, 2012 1:14 PM
  • What Report framewok is being used here, I'm unfamiliar with RDLC.

    JP Cowboy Coders Unite!

    As the title says...
    Friday, June 8, 2012 1:19 PM
  • Hey Dorkk;

    That was a good answer.  I actually looked it up on google no thanks to you.


    JP Cowboy Coders Unite!

    Friday, June 8, 2012 4:07 PM
  • I took it as being the Report Viewer Control that ships with the Report Viewer Redistributable but it's a good call as I'd forgotten that they're on to their fourth version of this now.

    @BRingrose Are you using 2005, 2008 or 2010 version?  I'm assuming you're not uing 2012 Beta?

    Monday, June 11, 2012 1:54 PM