This is a migrated thread and some comments may be shown as answers.

ReportParameters check

1 Answer 61 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 10 Feb 2014, 12:33 PM
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?

Cheers,

Jack

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 11 Feb 2014, 07:48 PM
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.

Regards,
Stef
Telerik

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.

Tags
General Discussions
Asked by
Jon
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or