VB.NET - ReportViewer pass variable to windows form

Posted on 2011-10-18
Last Modified: 2012-11-29
I know that variables can be pass from windows form to a reportviewer as parameters.  However, is it possible to do the opposite?  I have some links in my report that when the user clicks, it would open the file.  I want to pass the path of the file back to my windows form to keep track of what was being clicked on and who was clicking on that file.  

I'm curious if this is even possible to track clicks from reportviewer and report that back to windows form as a variable?  If so, how would I go about doing this?
Question by:holemania
    LVL 48

    Expert Comment

    Microsoft Reports doesn't have events and that way you cannot do that (not that I know).

    Is not another way you can do that?
    LVL 100

    Expert Comment

    Which reporting tool are you using?

    LVL 18

    Expert Comment

    LVL 83

    Accepted Solution

    If you are using MS reporting, there is a Hyperlink event on the report viewer


    Author Comment

    CodeCruiser, that might look like what I'm trying to do.  Basically, I am passing a file path as a variable from the reportviewer back to the main windows form using  The example provided is somewhat vague on what I need to do.  

    I tried googling more about reportviewer hyperlink event, but not much came up.  I did find some with using web forms, but still not clear.  Any ideas or examples you can provide?  

    Basically when user click on a link, that link opens a file.  I want to pass that link back to my windows application so that I can record which file was open by that user, time, and who the user is (info from windows login).

    I got all that information except the ability to pass that one variable back to windows form.  Any help is greatly appreciated.
    LVL 83

    Expert Comment

    Did you try handling the hyperlink event? What's returned in the e argument?

    Author Comment

    Sorry, I'm not sure how to returned the argument on the example that was provided.  I tried googling for some examples for a few days now without much luck on using hyperlink event.  

    Not sure what to do after declaring the eventhandler.

    Author Closing Comment

    Provide some useful info, but took a different approach.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Article by: Kraeven
    Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    759 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

    10 Experts available now in Live!

    Get 1:1 Help Now