Pass data from SSRS report result set to Webform

  • This is my first post here so good day to all.

    Let me give you a background on the item I need help with.

    Where I am as we speak (as simplified an explanation as I can give):

    Webform1 has a textbox1 and button1 control on it.

    Upon clicking button1 it that captures the textbox1 data and passes the captured value to Webform2

    Upon loading Webform2 the parameter is passed to the reportviewer control where the report displays queried result.

    All of the above is already in place.

    What I want to know:

    Is it possible to have the SSRS report contain links within the results of the report that can be passed back to a Webform so that it can be used to populate textbox controls on a third webpage? Sort of like a drillthrough but not.

    i.e.

    Webform with Reportviewer control that has a SSRS report result which returns and ID column.

    Each piece of data in the ID column has a link that passes the piece of data as a parameter to Webform3.

    Webform3 takes the parameter and passes it to a SQL stored proc which returns the data to load textbox controls on Webform3.

    Can this be done?

    Clear as mud?

    Any and all help is much appreciated!!!

  • What I want to know:

    Is it possible to have the SSRS report contain links within the results of the report that can be passed back to a Webform so that it can be used to populate textbox controls on a third webpage?

    If your web forms are of the kind that look like this http://<your_webserver>/default.aspx?value1=blah&value2=blahblah

    e.g. they accept values using the http-post method (I'm not a web/.net developer but I think I'm explaining this correctly)...

    ...if that is the case and I am correct about what you are trying to do then you could:

    1) update the dataset that feeds your tablix (or matrix) to include a webform3_url column like this:

    --A dataset that calls values that your report needs & builds the url based on the values in your table

    WITH your_table(value1, value2) AS

    (SELECT 'Chicago', 'dog' UNION ALL

    SELECT 'Miami', 'bird')

    SELECT value1,

    value2,

    'http://your_server/default.asp?name1='+value1+'&name2='+value2 AS webform3_URL

    FROM your_table

    2. In the text-box properties of where you would like you link you would go to Action, then select the Go to URL radio button.

    3. In the drop down you should see webform3_URL, select that.

    Let me know if this helps or if I am misunderstanding what you are trying to do.

    EDIT: Code cleanup

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • At first glance, this sounds exactly like I want to do. I am going to try it out today I will let you know.

    Thanks for the response!!!

  • No problem, good luck!

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply