Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Report Variable
Message
From
30/04/2002 14:37:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00651025
Message ID:
00651027
Views:
16
"Totals don't show up correctly" - what is the expected value vs. the value shown?

One frequent error with report variables is to sum twice: a) in the definition of the variable itself, b) in the corresponding group footer or summary band.

If this is the case, the totals will show much higher than they should be.

HTH, Hilmar.

>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
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform