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

Reporting Parameter LoadOnDemand

1 Answer 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
DM
Top achievements
Rank 1
DM asked on 31 May 2012, 05:08 PM
I am using the latest version of Telerik Reporting. My Report has 3 parameters that use seperate Datasources for each. One of the Datasource objects returns a large dataset. I would like to know how to implement the same  Load on Demand  functionallity as I use on the RadComboBox Controls Load on Demand. 
It would even work if I had the functionallity like Telerik uses on the ComboBox used when you Select your Country on the Create accout page.

Thanks,
DM 

Example from RadComboBox
protected void RadComboBox2_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
     DataTable data = GetData(e.Text);
}

private static DataTable GetData(string text)
{
     SqlDataAdapter adapter = new SqlDataAdapter("SELECT * from Customers WHERE CompanyName LIKE @text + '%'",
ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);
adapter.SelectCommand.Parameters.AddWithValue("@text", text);

DataTable data = new DataTable();
adapter.Fill(data);

return data;
}


1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 01 Jun 2012, 11:16 AM
Hi,

The built-in report parameters' purpose is to provide basic UI that is available out of the box and that is enough for most scenarios. For other cases, when you require customization, you can hide all report parameters (Visible=false), create a custom parameter area and wire it up to the Report API e.g. use RadComboBox for ASP.NET AJAX control and pass the input via the report API:
Copy Code
Telerik.Reporting.Report report = (Telerik.Reporting.Report)this.ReportViewer1.Report;
report.ReportParameters["MyParam"].Value = RadComboBox1.SelectedValue;

This way you can implement the load on demand functionality which you require.

All the best,
Steve
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
DM
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or