Hi *, I have this piece of DTML... <dtml-var expr="(wi_extrtlty - wi_extrtlly) / wi_extrtlly * 100" fmt="%.2f"> which works fine. At the end of my report I want to display the total in my <dtml-if sequence-end> and can't understand why this won't work... <dtml-var expr="(total-wi_extrtlty - total-wi_extrtlly) / total-wi_extrtlly * 100" fmt="%.2f"> Can anyone shread some light on this? Regards, Michael
At 04:06 PM 5/17/2004 +1000, Michael Fox wrote:
At the end of my report I want to display the total in my <dtml-if sequence-end> and can't understand why this won't work...
<dtml-var expr="(total-wi_extrtlty - total-wi_extrtlly) / total-wi_extrtlly * 100" fmt="%.2f">
Can anyone shread some light on this?
Hi Michael, This will work fine (although it won't be what you want) if you define the quantity 'total' that you are using in this equation. What you really have here is: ( ( total - wi_extrtly - total - wi_extrtlly) / total ) - ( wi_extrtlly * 100 ) with an unintended (possibly undefined) quantity called total. This is not what you want, I'm sure. 1. Don't use hyphens in your variable names, ever. 2. Make your names more distinct than extrtly and extrtlly, wherever possible. That must be nightmarish to debug. =Paul
Michael Fox wrote at 2004-5-17 16:06 +1000:
... At the end of my report I want to display the total in my <dtml-if sequence-end> and can't understand why this won't work...
<dtml-var expr="(total-wi_extrtlty - total-wi_extrtlly) / total-wi_extrtlly * 100" fmt="%.2f">
Can anyone shread some light on this?
Read about the "prefix" attribute of "dtml-in". Use it... -- Dieter
participants (3)
-
Dieter Maurer -
Michael Fox -
Paul Howell