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

Report datasource and table datasource pagecount

1 Answer 153 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tore
Top achievements
Rank 1
Tore asked on 16 Apr 2013, 03:45 PM
Hello, I have a need to display in the report the passed in parameters and the data in tables. I like to use the same data source for this
for the table and the report. This causes a bug, where the print page count is wrong. Say your table data is 2 pages long, the page count is much higher. It is even worse where multiple tables share the same object data source.

It is nice to reuse the logic and the same object data source, but present different information, such as table header information and let tables display different parts of the row data. Is it possible to avoid the excessive page count in the print preview. This will cause some dissatisfaction for users wanting to print their reports onto paper. 

Regards 
Tore Aurstad, 
Systems developer
HEMIT 

1 Answer, 1 is accepted

Sort by
0
Accepted
IvanY
Telerik team
answered on 19 Apr 2013, 10:37 AM
Hi Tore,

The issue you are having is due to the fact that you have set the data source of your report to be the same as the one of your table. This means that if you have 10 records in your database for example the report will generate 10 rows - a row for each record in the database. Additionally since the report itself can be data bound it will render 10 tables for each record in the database, i.e. the detail section will be rendered 10 times and since the detail section contains the table the end result will be 10 tables. Therefore you will need to remove either the table data source or the report data source.

In order to render the report correctly you will have to set the data source only to one item and not to both. Then you will have to redesign your report so that all your data is displayed as you need it. You can also try generating your report using the Report Wizard which will guide you step-by-step and will use the report itself as a data item.

Regards,
IvanY
the Telerik team

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

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