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

estimate rendering time

3 Answers 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 27 Mar 2012, 07:29 AM
Hello there,

we are using telerik reporting (latest of 2011 as of now, will most likely not upgrade all controls etc. before this project stage is done) and everything is working fine, but i am missing or can't find one thing right now:

I'd like to be able to announce an estimate rendering time once the datasource for a report exceeds a certain number of rows. With test data i created some reports that took like 20 minutes to render with around 12000 pages to be rendered, something i do not expect often in reality but i do not want to forbid to process such reports.

Is there any way to warn the user "Your report of an estimate XX pages will take an estimate XX minutes/seconds/whatever"?
Of course i could just use average values from testing with several machines etc. but that seems a very very dirty approach to me ;)

Thanks in advance
Seb

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 Mar 2012, 09:06 AM
Hi Sebastian,

The declarative data source components used for binding a Telerik Report are exactly what the name implies: a declarative means to express how the data is obtained for the report. It is the reporting engine that performs the actual data retrieval, there is no data access logic in the data source component itself. For that reason it is not possible to query the data source component for the number of records that are about to be returned, nor estimate the number of pages or time it is going to take. It is up to you to implement such logic. For instance, by trial and error you can see how much time a certain report takes to render with certain amount of records and you can implement a stored procedure that just returns the number of records for a given search criteria without actually retrieving the data. You can use that stored procedure to validate the user input beforehand and prompt the user when the search criteria (implemented by report parameters) needs to be rectified (the search criteria would return xxxxx number of records and would take more than xx minutes to render). Based on this you prompt the user whether he would like to proceed with the report generation or not.

Hope this helps.

Greetings,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Sebastian
Top achievements
Rank 1
answered on 27 Mar 2012, 09:54 AM
thanks,

that is basically what i am doing now: getting the info about records etc. before i start with the actual reporting at all.
I was just wondering if it is e.g. possible to somehow run something like a silent/invisible report with full rendering as "speed check" in such a case, but with just processing eg. 1 % of the data and then returning me the time values it needed to proceed.

It's just because i cannot estimate the rendering time "based on experience" w/o knowing the machine it is running on, an 8 core machine will be way faster than an old machine and so on...
0
Steve
Telerik team
answered on 27 Mar 2012, 01:35 PM
Hi Sebastian,

There is no silent "speed check" rendering that could really server this purpose. You can use RenderReport method of the ReportProcessor class to render the same report with limited number of records, but this would not necessarily bring valid time info as the complexity of the report layout, the complexity of the data calculations (aggregates, conditional formatting), the rendering media and the size of the generated document (in pages) all play role and in some cases cause exponential increase of processing times.

We would advise to make the time measurement on a "worst case scenario" basis (machine with low processing power) and issue a warning to the user that the search criteria might take some time, and if his machine is better, then simply the report would be rendered quicker.

Regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Steve
Telerik team
Sebastian
Top achievements
Rank 1
Share this question
or