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

Question Regarding Repot Layout

2 Answers 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 21 Oct 2013, 10:26 PM
Hi Telerik,

I am new to the whole 'reporting' scene. But I'd like to layout a report that uses 2 data tables into a logical tabular format.

For example please consider the picture attached. I would like the table to grow sideways. The Subject column is data from 1 data table while the remaining property columns including adjustment columns are a flattened data table that was a result from a join.

I can't figure out how to data bind these two tables into a report table. Also I am having trouble understanding how the report will grow sideways and line up values correctly if (as the documentation suggests) I have to use a sub-report.

As you can see I'm a little bit more than confused here. Any help would be appreciated.

2 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 24 Oct 2013, 03:05 PM
Hi Craig,

To achieve a similar result as the attached image you have to flatten your data even further and join the Subject column with your other data table. Then you will be able to data bind the resulting table to a reporting table. You can read more about using tables here: Table/Crosstab/List.

As for the automatic growth of your table and adding additional "Adjustment" table columns, you can add dynamic columns to a table programmatically. I've attached a sample project that shows you how to create table dynamically (needs the AdventureWorks database).
Keep in mind that when adding columns to a table dynamically, if your table gets too wide to fit on the page it will cause a horizontal overflow and will continue on the next page. More information on the topic can be found here: Understanding Pagination

Regards,
Nasko
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Craig
Top achievements
Rank 1
answered on 30 Oct 2013, 05:46 PM
I found a much easier solution on my own. My data cannot be flattened as you suggested because there is a 1 to many relationship between the "Subject" column and the properties that follow it. This is for comparison purposes.
I was able to achieve my layout using the following layout

|-----------------Contain Table Holds 'Rows' -------------------------------------------------|
|   |---------- Subject Table in 'Rotated' mode  -------------------------------------------|  |
|   |    Data Label      |        Databound 'Subject' DS      |     Grouped Column       |  |
|   |   |------ Comparable Property Table nested in  parent Grouped Column ---|  |  |
|   |   |   Databound Comparable Property   |   Databound Adjustment Column |  |  |
|   |   |------------------------------------------------------------------------------------------|  |  |
|   |-----------------------------------------------------------------------------------------------|  |
|----------------------------------------------------------------------------------------------------|
Tags
General Discussions
Asked by
Craig
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Craig
Top achievements
Rank 1
Share this question
or