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

Create Multiple Reports

4 Answers 285 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marjan
Top achievements
Rank 1
Marjan asked on 22 Sep 2011, 07:12 PM
Hello everyone

I started using telerik reporting this week and it's great. But I'm little stuck because of lack of knowledge and little time left to do my tasks.
I have a multiple select dropdown list report parameter and i want for every selected item in the list to create detailed report coresponding for that selected item, and every detailed report to be in one different page. What should i do, any hint or guide will be great. 
Thanks very much :)

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 27 Sep 2011, 05:17 PM
Hi Marjan,

In order to accomplish your scenario you have to use custom UI (dropdown control) for the multiple select list and based on the selection to instantiate a custom ReportBook with parametrized constructor. Based on the constructor's parameter you can instantiate the required report definitions and set their parameters as shown in the following code snippet:

public class ReportBook : Telerik.Reporting.ReportBook
{
    public ReportBook(int[] ids)
    {
        foreach (int id in ids)
        {
            var report = new Invoice();
            report.ReportParameters["InvoiceID"].Value = id;
            this.Reports.Add(report);
        }
    }

Generally the reports' parameters are merged. In order to avoid this our suggestion is to set ReportParameter.Mergeable to false.

You may find useful the ReportBook class used in the demos that came with your installation of Telerik Reporting. (start -> All Programs -> Telerik -> Reporting Q2 2011 -> Visual Studio 2010 Examples )

The suggested approach is not applicable for Silverlight report viewer.

Greetings,
Peter
the Telerik team

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

0
Marjan
Top achievements
Rank 1
answered on 28 Sep 2011, 07:56 AM
Thanks for your post...

I find this quite useful 

Greeting Marjan

0
Andrea Marchetti
Top achievements
Rank 1
answered on 04 Nov 2011, 12:51 PM
I have the same scenario. However, use silverlight viewer. There is another method to obtain the same result?
Thanks
Andrea
0
Peter
Telerik team
answered on 08 Nov 2011, 03:16 PM
Hello Andrea Marchetti,

Check out the Silverlight ReportViewer and ReportBook forum thread that elaborates on the topic.

Kind regards,
Peter
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

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