What’s wrong with [( ?

A client has a design system that produces order confirmations with prices. On one type of order confirmation the prices were not totalled. Why?

Since we did not build and do not support this system, and since the relationship between our client and the current supporting firm is not very good, we were asked to find out what was wrong.

Cause

After a long search the problem was narrowed down to one line of code in an XML file:

<Text Right=”190” Top=”230” HorizontalAlignment=”Right” SkipIf=”[([Equal([Amount1];0.00)]”>[FormatDouble([Add([Amount1];[Amount2])];.2)]</Text>

The solution is presented in below. Do not scroll down if you want to find the problem yourself.

 

 

 

 

 

 

 

 

 

 

Solution

The cause was the excess [( brackets in the Skipif section. Because of this, an internal error was caused because of which the entire line of code was ignored. Luckily enough the rest of the code was read and used and the orde confirmation itself was printed.
 

<Text Right=”190” Top=”230” HorizontalAlignment=”Right” SkipIf=”[([Equal([Amount1];0.00)]”>[FormatDouble([Add([Amount1];[Amount2])];.2)]</Text>

posted @ Sunday, February 21, 2010 3:42 PM

Print