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

reportbook pass to class parameters

1 Answer 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 14 Sep 2011, 05:26 PM

I have several reports the have parameters passed to the SQL statement through class parameters.

public string Param1
{
    get
    {
        return (string)this.OrderPackData.Parameters["@InvoiceHeaderKey"].Value;
    }
    set
    {
        this.OrderPackData.Parameters["@InvoiceHeaderKey"].Value = value;
    }
}

The reports are run as follows:

IReportDocument runtimeReport;
runtimeReport = new InvOrderPackList();
this.ReportViewer1.Report = runtimeReport;
(ReportViewer1.Report as InvOrderPackList).Param1 = "='" + Request.QueryString["InvoiceHeaderKey"] + "'";

How do I convert this to use in a reportbook?

Regards, Lee

 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 20 Sep 2011, 09:44 AM
Hi Lee,

Our suggestion is instead of class parameter to use a report parameter. Another option is to expose the class parameter in your ReportBook class. You may find useful the ReportBook demo that came with your installation of Telerik Reporting. (start -> All Programs -> Telerik -> Reporting Q2 2011 -> Visual Studio 2010 Examples )

All the best,
Peter
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

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