General information
Title:
Problem with Report Variable
Hi All,
I am trying to create a report of amounts paid to an agent(agentpaid)
with subtotals by currency type for each month and another subtotal for the
agent for the entire year
Here is my query and
select agent,units,agentpaid,mnnum,ncurrency;
from vendpay;
order by agent,mnnum,ncurrency;
into cursor temp1
where mnnum = month number (1 thru 12)
and ncurrency is 1 of 4 different currency types (US $, Lira, Euro, Stg)
There are 3 groups on the report
Group 1 agent
Group 2 mnnum
Group 3 ncurrency
The first set of subtotals for each currency type by month work fine
I am summing agentpaid and reseting at ncurrency with the subtotals
showing correctly in Group 3 footer.
I cannot get the currency subtotals by agent to work.
This is how I approached the problem
I created 4 report variables TOTUS,TOTLIRA,TOTSTG,TOTEURO
Example TOTUS
Value to store :IIF(ncurrency="Lira",agentpaid,0)
Initial value : 0
Reset at : agent
and similarly for the other 3.
I placed each of these 4 variables in the Group1 footer
with no summation and reset at agent.
However these totals do not show up correctly.
I am probably doing something stupid but Im too stupid to fix it.
Any help is appreciated !!!!!!!!
Thanks
Carmel
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only