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

Adding parameters

1 Answer 155 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ismail
Top achievements
Rank 1
Ismail asked on 16 Jul 2012, 01:37 PM
i have been able to get my report to send as an email attachment with out any parameters, i would like to know if anyone could assist me with sending a telerik report with parameters.

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 19 Jul 2012, 08:45 AM
Hi Ismail,

Exporting a report with parameters is not very different from exporting a report without them. You simply have to set the initial value of the parameter(s) like this:
instanceReportSource.ReportDocument = report1;
 
// Adding the initial parameter values
instanceReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));
where "OrderNumber" is the name of the parameter and "SO43659" is the value. 

You can find more information in the Exporting Report Programmatically and InstanceReportSource Class articles.

All the best,
IvanY
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

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