XML Tag "Sum" of tree view doesn't sum when there are a lot of records

38 views
Skip to first unread message

Fabyc

unread,
Jul 29, 2016, 8:13:01 PM7/29/16
to tryton
When in a tree view is used the XML tag "Sum", it works perfectly when 
there are not many records for example 50. When in the list the are for 
example 200 or more records, the sum doesn't work [1].

Is it needed to do something else or is it a bug?



Thanks

--
Regards

Cédric Krier

unread,
Jul 30, 2016, 5:20:04 AM7/30/16
to tryton
On 2016-07-29 17:13, Fabyc wrote:
> When in a tree view is used the XML tag "Sum", it works perfectly when
> there are not many records for example 50. When in the list the are for
> example 200 or more records, the sum doesn't work [1].
>
> Is it needed to do something else or is it a bug?

It is the expected behaviour. It is the client who does the sum and so
he needs to have read all the records. But the client is optimized to
limit the number of records it loads for performance reason and the sum
code does not force the client read all the records also for performance
reason.
So if you want to have the sum you must scroll over all the record to
ensure they are all loaded.

There are two possible improvements:

- compute the sum of selected if at least those records are loaded

- defer the sum computation to the server side if records are not
loaded

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Fabián

unread,
Jul 31, 2016, 8:09:14 PM7/31/16
to try...@googlegroups.com
On Sat, Jul 30, 2016 at 4:18 AM, Cédric Krier <cedric...@b2ck.com> wrote:
On 2016-07-29 17:13, Fabyc wrote:
> When in a tree view is used the XML tag "Sum", it works perfectly when
> there are not many records for example 50. When in the list the are for
> example 200 or more records, the sum doesn't work [1].
>
> Is it needed to do something else or is it a bug?

It is the expected behaviour. It is the client who does the sum and so
he needs to have read all the records. But the client is optimized to
limit the number of records it loads for performance reason and the sum
code does not force the client read all the records also for performance
reason.
So if you want to have the sum you must scroll over all the record to
ensure they are all loaded.

OK
 

There are two possible improvements:

    - compute the sum of selected if at least those records are loaded

    - defer the sum computation to the server side if records are not
      loaded

+1
Very good improvements.

Thanks

--
Regards
Fabyc
Reply all
Reply to author
Forward
0 new messages