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
The technical forum of the NBN Trust for use by the Network. It includes discussions and announcements on the NBN Atlas, Recorder 6 and Indicia |
You are not logged in. Please login or register.
Forum → Indicia Development → 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
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
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
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?
Hi Daniel
I've applied your patch, thanks. Parameters to the report and data services can all now be in post or get.
Regards
Forum → Indicia Development → Counting and pagination in reporting service
Powered by PunBB 1.4.6, supported by Informer Technologies, Inc.