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

Dynamically render sub-report based on the value of a data sourcecolumn

1 Answer 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 11 Nov 2016, 10:05 AM

Hi

I need to show a list of people in alphabetical order,but the actual details displayed, such as text boxes / labels are laid out differently depending on one particular column, UserTypeId e.g.

User 1
User Type 1 details | more details
-----

User 2
User Type 1 details | more details

-----

User 3
User Type 2 different details
User Type 2 more details | even more details
-----
User 4
User Type 1 details | more details

etc..

The layouts for each user type are quite specific so a simple table would not work.

My thinking is to create a sub-report for each user type, but what is the best way to dynamically render this sub-report based on the user type value? Can this be achieved through data-binding, or would it be best to take complete programmatic control of the report?

Regards,

Dan.

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 11 Nov 2016, 01:28 PM
Hi Dan,

You can show/hide elements based on the type field - conditional formatting. The type field can be used for filtering row groups in a table item as well, which will result in showing/hiding rows from the Table item.

Please check:
  1. Report Structure - details how sections are rendered in a report
  2. Design Considerations for Report Item Layout - details how sections and items are positioned depending on different settings, and how they move if elements are hidden;

The attached demo report illustrates two approaches to have the different layout based on the type field. The report can be previewed in the Standalone Report Designer of R3 2016 or newer. You can find also a video illustrating the creation of the demo report - a SWF file previewable in IE browser.

Regards,
Stef
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or