Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Percentage calculation in expression of report
Message
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00588031
Message ID:
00588219
Views:
34
>Hi Nadya,
>I've been using CalcRpt as the horizontal sum or each row in the Detail band and also in the Summary band as the vertical sum of the total of that result.

You still can use variable. Give this variable sum of each field (either in expression window or as a result of function call).

If you need sum of this value, just put the same field in the summary band, but check Sum in calculations. If you need to use this Sum in some sort of calculations, you would need another report variable, which would be the same, as normal variable, but with Sum checked.

Does it clarifies or confuses more? :)

>Each row record pertains to an employee and their individual total is calculated in the Detail band and at the end of the report their combined totals are calculated in the Summary band. Would that change what the expression should be?
>Thank you!
>Max
>
>> Max,
>
>> If this case nCalRpt program even should not be called, since we're not using it anymore.
>
>> Ok, once again:
>
>> 1) Create a variable in Report. Give it another name, say, MyVal
>2) Put field1+field2+field3 in the value to store and 0 in Initial value
>3) use this variable in detail band in field expression:
>iif(myVal+Field2>0,(MyVal/myVal+Field2)*100,0)
>
>> See, if the above will work. If not, try first on a test report, then see, why it is not working on yours?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform