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

Create Table that always has 5 rows

5 Answers 23 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
dlmusial
Top achievements
Rank 1
dlmusial asked on 13 Aug 2013, 11:44 AM
Hello All,

I wanted to create table that has 5 rows regardless of number of entries returned from database. For example if there are only two entries in the database, table should display those entries and also display three emptry rows.

I tried to add those rows manually, but it seems very hard and counter intuitive.

Your help would be greatly appreciated, thanks.

Kind regards,
Ben

5 Answers, 1 is accepted

Sort by
0
dlmusial
Top achievements
Rank 1
answered on 13 Aug 2013, 02:09 PM
Hi again,

I manager to extend table with some code after InitializeComponent().

Is there a method to read current table row/item count?

Kind regards,
Ben
0
dlmusial
Top achievements
Rank 1
answered on 14 Aug 2013, 02:16 PM
Hello Again,

Is there any hope of getting anwer to this question?

Kind regards,
Ben
0
Stef
Telerik team
answered on 16 Aug 2013, 11:01 AM
Hello Ben,

The easiest approach would be to add the missing to 5 rows to the data that will be displayed in the Table item. If you decide you can create the Table item programmatically. Thus if the retrieved records are less than 5 you can add add static row groups to the item's definition.

Let us know if you need further help. Feel free to send us more details about the scenario and the current report definition in a support ticket, or post the information here.

Regards,
Stef
Telerik

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

0
dlmusial
Top achievements
Rank 1
answered on 16 Aug 2013, 01:55 PM
Hello,

Could you plase elaborate a bit more about adding rows to the data? Should I do this in SQL query? Becase when I try to add additional groups I don't know how many rows are already there (when doing it from C# code).

Kind regards,
Ben
0
Stef
Telerik team
answered on 21 Aug 2013, 12:28 PM
Hi Ben,

On data level you can use joins and unions to return always 5 records, or you can load the data in a custom object and add the missing to 5 records.

On report level, you would have to check the number of records in the retrieved data and programmatically add static rows to the Table item to make it looks like it has 5 rows.

Let us know more details about the scenario and the way data is retrieved, so we can provide you more accurate suggestions.

Regards,
Stef
Telerik

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

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