The Variable Component and Calculation Popup Window
|
1. | In your Quote report drop a variable component into the Details Band between the List Price and Charged Price fields. Set the return value of the variable to be Currency. We note that the variable is somewhat anonymously called "variable1", which may not be too user friendly when we come back to work on the report again one day; so lets rename it.
|
2. | From the View | Toolbars menu select Report Tree. Find the variable1 component in the TreeView displayed, right click on it an select Rename. Lets call it "LineDiscount". Close the Report tree if it is no longer needed.
|
3. | Right click on the variable and select Calculations. Use the ToolWindow to drag the 3 data fields that you need to calculate the line discount so that you end up with procedure code like this:
|
4. | Now add another variable component to the report but this time to the Summary Band. Rename it to be DiscountTotal and set its return value type to be Currency. Set its Calculations code to be:
|
Value:= Value + (List['Eqlist Detail-q Request']*List['Eqlist Detail-list Price']) - List['Eqlist Detail-charged Price'];
|