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

Server side paging for large amount of data?

11 Answers 430 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Varun
Top achievements
Rank 1
Varun asked on 22 Dec 2011, 11:13 PM
Hi,
  I am using Q3 2011 latest version. I am using ObjectDatasource to bind the data to the report. Is it possible to do paging on server side so that the whole dataset does not need to to be requested at each request?

Lets assume a simple table report with few parameters like From date and To Date for transactions and a product type filter.

Thanks,

11 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 Dec 2011, 09:59 AM
Hi Varun,

Actually the behavior is the opposite, the report viewer renders only once the processed report and the data is pulled once, it does not get pulled on each page request. If you're working with SQL database, we recommend using the SqlDataSource Component to bind directly to it, instead of going through dataset and ObjectDataSource.

Greetings,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Varun
Top achievements
Rank 1
answered on 04 Jan 2012, 07:37 PM
Hi Steve,
  Thanks for replying! You are absolutely correct. Due to security and other considerations we have to stick with ObjectDataSource for this project. So what we are trying to achieve is actually to be able to MANUALLY get data for each page/request so that we don't have to populate the report dataset with 1 million rows.

What I want to do is the following:

1) if I select report parameters and select preview button, I want the call to go to a method and then I can get the data from webservice by sending it the selected report parameters.

2) For paging, I want to provide datasource manually so that we can provide data as needed instead of populating datasource with ALL the data.

This seems to be a must requirement for medium/large size of data.

Please let me know if this kind of functionality is provided by Telerik Reporting.

Thanks for excellent support!
0
Jorge
Top achievements
Rank 1
answered on 05 Jan 2012, 08:09 PM
Hi.....

I'm actually an Architect on on a big public web site implementation and I have a similar question to this one. We are planning to use the Telerik Reporting control for our public web site, all our architecture is 3 Tier based so we don't do calls directly from the web server to the database. Everything has to go through a middle tier services layer where the DB connection is available (our backend is Oracle BTW). Is it possible to use the Telerik WCF reporting services to provide this middle tier isolation? Can we provide our custom services and hook them up somehow to the Reporting Web server control? There is another alternative? I understand the report control needs to know the datasource in order to perform data-calculations and so... but if this is the limitation and there is no middle tier available to provide this feature I need to understand it to take the best decision in our architecture.

Thanks a lot for your help.
0
Steve
Telerik team
answered on 09 Jan 2012, 04:43 PM
Hi guys,

@Varun: Since you prefer to stick to the ObjectDataSource you can bind it to a method that returns only the relevant data you expect based on a public property or parameter in the constructor, the choice of implementation depends on you.
You cannot intercept and interfere with the Preview button, so if this procedure is required, you would have to create your own UI that would serve as report parameter editors. You can wire those up easily to the report via the API.

@Jorge: Which viewer do you plan to use - the Web Report Viewer or Silverlight Report Viewer? Telerik Reporting is embedded engine and part of your application, so you should be able to bind it in a similar fashion like any gridview control. The following blog post might be of interest to you: Using Telerik Reporting with WCF RIA Services.

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Varun
Top achievements
Rank 1
answered on 09 Jan 2012, 08:03 PM
Hi Steve,
  So it  looks like I have to create my own parameters UI out of the reportviewer control, get the data and set that as the report's datasource. I think its fine.

This raises another question, how to get similar behavior(getting data on demand) during pagination?
This means:
  1. When user clicks on next/previous or enters a page number, we get the data from the data store.
  2. This has to work with exporting and printing aswell, where I will expect all the pages of the current dataset to be exported or printed.

Thanks,
Varun

0
Jorge
Top achievements
Rank 1
answered on 09 Jan 2012, 11:15 PM
Actually we are planning to use the Web Report Viewer... Can we use the middle tier services in that case? Sounds like not for what I read on that article.


Thanks for the response.

Jorge.
0
Steve
Telerik team
answered on 12 Jan 2012, 03:29 PM
Hi guys,

@Varun: the data is pulled only once, it does not get pulled on each page request when you work with the report viewer. Since you have custom requirements how this should work, I suggested creating your own method/s to handle this and the implementation depends on you.
If you use the ReportViewer Client-Side API, then whatever is currently loaded in the viewer would be printed/exported.

@Jorge: The client of your remote WCF service is the class library holding the reports. In order to consume the service you should not only add the Service Reference, but also should generate (maybe with VS help) the service proxy class. In this way you can consume this proxy class as a data source for the report. Use the ObjectDataSource Reporting component to connect to this proxy class and invoke the appropriate method.

All the best,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Jiten
Top achievements
Rank 1
answered on 22 Apr 2014, 12:31 PM
Steve,
Your solution is nice and I hope it will work. But I am confused how to set the total number of pages in report viewer UI. If I click next button in report viewer I need to send the page number to back end c# code file. Depending upon the page number I would query the data and display it in report. I wonder if we can set total number of page in report viewer and have  a handle to get the page number back in code file.
0
KS
Top achievements
Rank 1
answered on 25 Apr 2014, 08:26 AM
Hi,

The paging comes from the viewer and is based on the displayed content, without processing the whole data or knowing how big is the report with this amount of records there is no way to know the number of pages. The passed to server data should contain information about the range of records to be retrieved. Thus you do not need to know the page number, rather you need to know the last range of data so you can retrieve the next or the previous range. 

-KS
0
Adit
Top achievements
Rank 1
answered on 06 May 2015, 02:02 PM
I have read above comments, so Can we say that if we bind server side paging some how then export and other Report Viewer feature will not work for all data? As mentioned, it work with initially load data. Is that right?
0
Stef
Telerik team
answered on 07 May 2015, 03:35 PM
Hi Adit,

The export and print options in the viewer will work with the currently displayed report and its settings for parameters, filters and etc. If you want to export the same report but with other settings, you can use the ReportProcessor - Exporting Report Programmatically.

Regards,
Stef
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
General Discussions
Asked by
Varun
Top achievements
Rank 1
Answers by
Steve
Telerik team
Varun
Top achievements
Rank 1
Jorge
Top achievements
Rank 1
Jiten
Top achievements
Rank 1
KS
Top achievements
Rank 1
Adit
Top achievements
Rank 1
Stef
Telerik team
Share this question
or