Sorry - fat fingers there..
On 5/20/07, Andrew Jensen <[EMAIL PROTECTED]> wrote:
> Now I have got a report with two groups. In the outer group I want to
> count how many subgroups I get for each outer group value. A simple
> counting does not work, because it counts all the rows in the detail
> sections together. Does someone has an idea how to get it?
>
> That looked like fun...so I have been giving it a shot.
I started with the general idea of doing something like this ( pseudo )
SubGroupCount = 0
tmpVar = NULL
for each record
if tmpVar <> [TOP_GROUP_COLUMN] THEN
tmpvar = [TOP_GROUP_COLUMN]
INC( SubGroupCount )
So, then I had to figure out how to create tmpVar and SubGroupCount
variables. I was thinking perhaps I could use a function to do double duty.
So far no luck with that.
But I am finding some interesting things about function scope. Just not sure
what I have in front of me yet.
For example.
I created a report with 2 groups, using my test database TABLE1
Top group is based on field GROUP_ID
Nexted group is based on BOL_1
I created a function at the report level named rptFunc_1 with this
definition:
if ( [ID] < 5; 1; 0 )
Then I created a function at the GROUP_ID group level named grpFunc_1
defined as
if ( [ID] < 5; 1; 0 )
Finally I have a function at the GROUP_ID group level named grpFunc_2.
If I define that second function as
if( [grpFunc_1] = 1; "True";"False" )
I get one set of values on my report.
if I define it as
if( [rptFunc_1] = 1; "True";"False" )
I get a different set of values.
In the detail section I have a text box bound to grpFunc_2.
When grpFunc_2 uses grpFun_1 I get correct answers ALMOST all the time. The
last group has wrong answers.
When grpFunc_2 uses rptFunc_1 I get FALSE for every value of ID.
very curious.