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

Multiple subreports on same report

2 Answers 225 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amy
Top achievements
Rank 1
Amy asked on 05 Nov 2010, 08:37 PM
I am trying to have 2 subreports on one report, and which one becomes visible is based on a field value that is actually also a grouping on the main report.  I have looked through documention and other forum posts - most just deal with changing the datasource on the subreport, but I want to actually change which report appears.  Is this possible?  If so, how?

Thanks, Amy

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 10 Nov 2010, 08:20 PM
Hello Amy,

You can either setup Conditional Formatting with appropriate expression, which when true would hide the subreport (Visible checkbox unchecked), or you can utilize the Bindings property by using appropriate expression for the Visible property of the subreport.

All the best,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
rupesh
Top achievements
Rank 1
answered on 03 Dec 2010, 09:26 AM
Hello Ami,

You can write the code on ItemDataBound event of subreport for show/hide functionality. Code will be like below.

(sender 

 

as Telerik.Reporting.Processing.SubReport).Visible = (bool)this.ReportParameters["Parameter"].Value;

All the best. 

 

 

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