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

Silverlight + Adding subreports dynamically

2 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
rupesh
Top achievements
Rank 1
rupesh asked on 03 Dec 2010, 09:19 AM

Hi there,

I want to add subreports dynamically as per the selection. The detail scenario are as follows

1. I have 3 silverlight check box control and 3 reports as rpt1, rpt2 and rpt3.
2. If a user select first two check box then I want to display rpt1 and rpt2.
3. If a user select second and third check box then I want to display rpt2 and rpt3.
4. If a user select first and third check box then I want to display rpt1 and rpt3.

Thanks

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 06 Dec 2010, 04:57 PM
Hi rupesh,

In order to achieve your scenario, you have to create a master report and add three SubReports, and three boolean Report Parameters. To alter the subreport's visibility use a Binding with Visibility property path to a boolean report parameter. Finally to avoid the empty space you will have to set the master report's detail section height to 1 pixel within the report's constructor after the InitializeComponent(). Check out the attached sample project that I have created to illustrate the above solution.

All the best,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
rupesh
Top achievements
Rank 1
answered on 07 Dec 2010, 04:29 AM

Hi Peter ,

Thanks for your response. However, if you refer the post title "Silverlight + Adding subreports dynamically", I have requested for adding subreports dynamically and as per your suggested solution we need to use three subreports. But I want to use some on demand strategy. Means, If I need two reports then I want to use two subreports(No hide/show concept).

Moreover, I have achieved the scenario by using the panel and adding subreports dynamically but I am not sure it is a right way to do the same.

Thanks

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