Using Session variables in reports

2 posts, 0 answers
  1. Dave
    Dave avatar
    11 posts
    Member since:
    Dec 2011

    Posted 29 Dec 2011 Link to this post


    I have a fairly complicated report that uses 2 report parameters to generate the data for the report.

    I would like to be able to assign the values of these parameters from session variables when I load the page with the report.

    I've tried the several suggestion on the forum, but none of those seem to work. 
    I would like to assign the parameters in the page_load 

    I am using vb if that makes any difference.

    Thanks in advance for your help!
  2. Steve
    Steve avatar
    10941 posts

    Posted 03 Jan 2012 Link to this post


    In the following example you can see how to access a session variable and pass it as value for the report parameter:

    report1.ReportParameters("MyReportParameter").Value = System.Web.HttpContext.Current.Session("MySessionVariable")

    Let us know whether the proposed solution helps.

    the Telerik team

    Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Back to Top