[Zope] dtml-in and totals
paul at smoothstone.com
Mon May 17 07:03:10 EDT 2004
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?
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 *
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.
More information about the Zope