Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB.net Report Viewer: Disposing of old data and updating it with new.

Options
  • 20-02-2007 12:53pm
    #1
    Registered Users Posts: 1,052 ✭✭✭


    I’ve been using the report view awhile and have got it working the way I would like, well almost. Behind the button to generate my report I have

    ReportViewer1.Visible = True
    Me.Query1TableAdapter.Fill(Me.riltlaserDataSet.Query1)
    Me.ReportViewer1.RefreshReport()

    This report is getting the top 10 products sold and is pulling the information from my access database. It works perfectly

    The problem is when I exit this screen and place a new order. Selling more products means that it will affect the top 10 products but when I go back to view the report again I get the same results from the start. The new results don’t take affect till I stop the prtoject and run it again.

    So I have tried placing code behine the button that takes me from the form that the report is on to the main menu. I presume I have to clear the dataset and data adapter of the report so I tried this

    Me.Query1TableAdapter.Dispose()
    Me.riltlaserDataSet.Query1.Clear()

    And then I tried seeling more products (of the top 10) but still to no avail. The new updates are refelected in the Database but not in the report.

    Any help suggestions?


Advertisement