Categories > TinyButStrong general >

number of items in a group ?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Cactusbone
Date: 2006-05-23
Time: 03:23

number of items in a group ?

using
&gt;Presents ([presents.#]) :<br />
        [presents;block=begin;headergrp=nomgroupe]&lt;[presents.nomgroupe]&gt;<br />[presents;block=end]
        [presents;block=begin][presents.prenom]<br />[presents;block=end]

which works well, i was wondering if i could add the numbers of rows contained in a group so i tried :

&gt;Presents ([presents.#]) :<br />
        [presents;block=begin;headergrp=nomgroupe]&lt;[presents.nomgroupe] ([presents.#])&gt;<br />[presents;block=end]
        [presents;block=begin][presents.prenom]<br />[presents;block=end]

and while the first one showed 2 (i have only 2 total records, all in the same group), the second one showed only 1 !

how should i proceed to get the desired effect ?
By: Skrol29
Date: 2006-05-24
Time: 01:06

Re: number of items in a group ?

Hi Cactusbone,

When the virtual # field is placed outside the block, then it displays the total of records. Inside the block, it displays the current records number.

To display the total number per group, unfortunately, you have to calculate it yourslef. Using parameter "ondata" for instance.
But you can notice that you cannot know the total number of records from a group since you've passed all records of this group.