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

How to output a list (single column in db) as a multicolumn list on a report?

11 Answers 807 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 06 Jul 2017, 11:52 PM

Hi,

Please help me with the following:

to output a list (a single column in a database) as a 4 columns list on a report, I have added a panel with four table/lists on it.The following expressions are here:

=RowNumber()%2   =0

=RowNumber() < (ReportItem.DataSource.Count / 4)   =True

The report returns the same information in all four columns. What should be done to enforce each other table/lists continue to output the list.

Thank you.

11 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 07 Jul 2017, 11:49 AM
Hi Nick,

You need only one Table item with column and row groupings making it render its cells in a specific position - How to: Create Multi-Column Report - Across the Page and Then Down.
You can produce a multi-column layout through the report's PageSettings properties as well, where the content will be rendered in columns in print preview  How to: Create a Multi-Column Report help article.


Let us know if you need further help.

Regards,
Stef
Progress Telerik
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
0
Nick
Top achievements
Rank 1
answered on 07 Jul 2017, 05:38 PM

Hi Stef,

 

Thank you. I followed How to: Create Multi-Column Report - Across the Page and Then Down

The report returns an error:  MyDataIndex is not defined. The report means =Fields.MyDataIndex/5

Sorry, as I understand MyDataIndex, should be replaced but with what? 

Thank you.

 

0
Stef
Telerik team
answered on 10 Jul 2017, 12:54 PM
Hi Nick,

In the How to: Create Multi-Column Report - Across the Page and Then Down KB article is sued a Table item bound to data having such field - MyDataIndex - which is an integer field representing a column of consecutive numbers. The value of this field and the specified row and column groupings of the Table item determine the position of the record in the Table item's structure.

You can add such field in the data source and use it for the groupings.

Regards,
Stef
Progress Telerik
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
0
Nick
Top achievements
Rank 1
answered on 11 Jul 2017, 10:24 PM

Thank you, Stefan.

Sorry, the data source cannot not be updated. May we count the existing records to get the number, then divide on the number of columns?

Thank you.

0
Stef
Telerik team
answered on 12 Jul 2017, 01:13 PM
Hello Nick,

Grouping expressions cannot use the RowNumber function.
If you are using a .NET object as data source, you can add another method thet gets the data and add a field with consecutive numbers. If you use a SQL query, you can add a field in the Select statement that will get the row_number over the received data.

In order to provide you more accurate suggestions, please post details about the data retrieval method.

Regards,
Stef
Progress Telerik
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
0
Nick
Top achievements
Rank 1
answered on 12 Jul 2017, 05:03 PM

Hi Stef.

Thank you. We use a .NET object as data source.

Thank you,

Nick

0
Stef
Telerik team
answered on 13 Jul 2017, 02:40 PM
Hello Nick,

In such case, test to create a top layer for the provided you data model/object e.g. a class with methods which call the corresponding methods of the original data object. In your wrappers you can extend the underlying model to your needs e.g. by adding the needed index field.

Regards,
Stef
Progress Telerik
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
0
Nick
Top achievements
Rank 1
answered on 13 Jul 2017, 04:05 PM

Hi Stef,

Thank you.

Best,

Nick

0
Pavithra
Top achievements
Rank 1
answered on 06 Dec 2018, 10:27 PM

I followed the approach given here - https://www.telerik.com/support/kb/reporting/details/how-to-create-multi-column-report---across-the-page-and-then-down. Instead of 3 I used 6 since I wanted my data to appear in 6 columns.The problem is I'm getting the data in steps (row n, col n).The first data appears in row 1 col1. The next one appears on row 2,col 2 and so on. Also the static text is repeating across 6 columns. Can you please let me know where I'm missing?

Thanks,

Pavithra

 

 

 

0
Ben
Top achievements
Rank 1
answered on 30 Dec 2019, 08:41 PM

Having the exact same problem as described above, data is filling the table diagonally. Were you able to resolve this? If so, mind sharing?

0
Ben
Top achievements
Rank 1
answered on 30 Dec 2019, 08:56 PM

Was able to resolve by using row detail group expression as follows:

= Floor(Fields.MyDataIndex/3)

Tags
Report Designer (standalone)
Asked by
Nick
Top achievements
Rank 1
Answers by
Stef
Telerik team
Nick
Top achievements
Rank 1
Pavithra
Top achievements
Rank 1
Ben
Top achievements
Rank 1
Share this question
or