Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...



For this example, add the following names for each macro

In the Evaluate the Evaluate Data macro

  • type the following code:

Code Block
${unitPrice} * ${quantity}
Info

The Evaluate Data macro should now look as below.

...

Info

The Hidden The Hidden Dataa macro is used when you want to enter data that you would rather not show to the reader of the page.

In the Hidden Data macroData macro

  • add two Number Data macros

    • name them "discount" and "tax"

    • choose Allow Decimal Values for each

...

  • Net Total (excluding tax and discount)

  • Discount Amount

  • Tax Amount

  • Grand Total (including tax and discount) 

Add four Evaluate Data macros for each of the values above and give them relevant names, as below


For each Evaluate Data macro

  • enter the following in the Display Format properties

    Code Block
    $ #,##0.00

Type in the following codes in the respective Evaluate Data macrosData macros

  • Net Total

    Code Block
    sumtable("purchaseTable","totalPrice")
  • Discount Amount

    Code Block
    ${netTotal} * ${discount} / 100
  • Tax Amount

    Code Block
    ${netTotal} * ${tax} / 100
  • Grand Total

    Code Block
    ${netTotal} - ${discAmt} + ${taxAmt}


The Evaluate Data macros Data macros should look similiar to the following.


...