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

Report parameters problem

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 2
Ivan asked on 28 Apr 2011, 01:15 PM
On the page code file, where is my reporting viewer I use:

XOReportingLibrary.Company.TheCompanyReport CReport = new XOReportingLibrary.Company.TheCompanyReport();
Telerik.Reporting.Report theReport = (Telerik.Reporting.Report)this.ReportViewer1.Report;
theReport.ReportParameters["CompanyName"].Value = "SomeCompanyName";

On the report code file I'm using:

string strCName = this.ReportParameters["CompanyName"].Value.ToString();

but this.ReportParameters["CompanyName"].Value.ToString()... by some reasone is NULL and does not works...
XOReportingLibrary is the name of the library, and TheCompanyReport is the name of the report

P.S.
If you have some simple code please send me!

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 29 Apr 2011, 08:57 AM
Hello Ivan,

The value of the report parameters would not be available in the report constructor. The following article elaborates on the proper usage: Using Report Parameters programmatically.

Kind regards,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ivan
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or