Open a Report and Pass a parameter to an embeded Windows Report from a Form in Visual Studio 2008

Posted on 2011-04-19
Last Modified: 2012-08-13
I have a filtered form displaying information on a specific id field (truckno) on a form.  I need a button to open a report that will show only information relating to that truckno ID.  I need to know how to open the embedded windows report and pass the paramater to the report so that it will open to the correct informaiton without prompting for information.

Thank you,
Question by:rtay
    LVL 83

    Expert Comment

    LVL 5

    Author Comment

    This is not really what I am looking for.  I get the text box prompt to show up, but I need to pass a value to that textbox in the report from a text box in the application form using a button control.  for example, the button click will call the report form to open and pass the required parameter to the report textbox, so the report will open to the desired content.  
    LVL 5

    Author Comment


    I think the following code may work, but I am using a remote server for SSRS and not a local one.  How would I change the code for that.  And is the code below correct.

    Public Class Form2

        Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the 'Develop_TareWeightDataSet.tbl_TruckInfo' table. You can move, or remove it, as needed.

            Dim p(0) As ReportParameter
            p(0) = New ReportParameter("mTruckNo", mTruckNo)
            ReportViewer1.ZoomPercent = 75
        End Sub
    End Class

    LVL 83

    Accepted Solution


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    A short article about a problem I had getting the GPS LocationListener working.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now