1

Re: Counting and pagination in reporting service

Hi,

is there a way to call the reporting service which allows counting and pagination? I've used the <field_sql> tag in my report definition.

Regards

Daniel

2

Re: Counting and pagination in reporting service

Hi Daniel
If you are using the code from trunk (as 0.6 did not have this), you can add wantCount=1 to the url parameters of the report webservice request. Then it will return the count in the response. Ideally you only do this on the first call and cache it so that subsequent calls when you change the page don't fire the additional count query.
Best wishes
John

John van Breda
Biodiverse IT

3 (edited by daniel.vergien 01-08-2011 19:12:45)

Re: Counting and pagination in reporting service

Hi John,

thanks for your answer. I can send "limit" and "offset" as post parameter, but "wantCount" only as get parameter. Is this the expected behaviour?

Best wishes

Daniel

4

Re: Counting and pagination in reporting service

Yes, it is as expected from the way the code is written (in data_service_base.php) though I can see your point that it might be more consistent to accept any parameter as GET or POST. There are others which need to be in GET as well so if this is going to be done it needs checking through the data and report services.
Would you be able to submit a patch for this?

John van Breda
Biodiverse IT

5

Re: Counting and pagination in reporting service

Hi Daniel
I've applied your patch, thanks. Parameters to the report and data services can all now be in post or get.
Regards

John van Breda
Biodiverse IT