ReportParameters check

2 posts, 0 answers
  1. Jack
    Jack avatar
    127 posts
    Member since:
    May 2003

    Posted 10 Feb 2014 Link to this post

    Dear Telerik,

    Finally I have got my report working but I just wanted to check with you that I have done it correctly.

    In my separate report class project I am hard-coding a value for the parameter ("UserID") - so that I can test it.

    On the display page I am using..

     Dim report As Telerik.Reporting.Report = New eReports.MainReport()
     report.ReportParameters("UserID").Value = UsersDB.UserID.ToString       'brings back the logged in users UserID Guid

    It works and overrides the hard-coded value  but is this correct form please please?


  2. Stef
    Stef avatar
    2933 posts

    Posted 11 Feb 2014 Link to this post

    Hi Jack,

    This is a correct way to assign value to a report parameter. you can also use the ReportSource Parameters collection, which maps by key to the report's ReportParameters collection. Consider the example in the TypeReportSource Class article.

    If your concerns are regarding working with GUID type, it depends what is the purpose the field. You can work entirely with String or use the approach illustrated in the How to use a Guid as value for report parameter or data source parameter? KB article.

    If you need further help, please elaborate on the scenario.


    New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

  3. DevCraft banner
Back to Top