Comparing Values in Different Records within Section

S

staxowax

Hi, I've been breaking my head on this all day and would appreciate any
help....

I have a report with 7 groupings, for 3 of which I show the footers,
which contain Sum functions calculating subtotals. When the report is
formatted, in the case when each record in a section does not contain
the same value (a 3-letter ISO currency code, e.g. USD) I need to hide
some fields. How can I determine if the ISOCurrencyCode field contains
the same value on each record within a formatted section?

I've tried many things: counting records, summing a numeric-equivalent
of the ISO code and dividing by the record count....All with no luck.

Thanks in advance for any help you can provide. Please respond to the
group. Thanks.
 
S

Steve Schapel

Stax,

A numeric equivalent of the currency code, as you suggested, looks
promising. Make a table with each possible currency code, and its
numerical counterpart, add this table to the query that the report is
based on, joined on the ISOCurrencyCode filed, and then put a hidden
control on the report for this number. Let's say you name it
ISOCurrencyNumber. Ok, then put an unbound checkbox in the group
footer, and set its Control Source property to...
=Sum([ISOCurrencyNumber])/Count(*)=[ISOCurrencyNumber]

Let's say you name this checkbox UniformCurrency, so in your code you
can do like this...
Me.NameOfControl.Visible = Me.UniformCurrency
 
S

staxowax

Steve-

THANKS very much!!!! I built on your idea, using
=Avg([ISOCurrencyNumber]) rather than calculating it. Thanks again!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top