Introduction
In Report Builder you can also do some simple calculation using the Variable (The Calculator Icon)
Steps
Below is example using Sales Invoice to get Net Unit Price (after Discount)
Using Variable
- 01. Click on SubRptNorm: Document_Detail
- 02. Select the Variable button (the Calculator icon)
- 03. Click on the place to be print
- 04. Click on Calc Tab
- 05. Right click here & Select Event & find the component just now we had placed (eg Variable2)
- 06. Click OnCalc
- 07. Click here & enter the below script
procedure Variable2OnCalc(var value: Variant);
begin
Variable2.DisplayFormat := Option.GetFieldValue('StockPriceDisplayFormat'); // Set Display Format
Value := Document_Detail.GetFieldValue('Amount')/Document_Detail.GetFieldValue('Qty');
end;
- 08. Click File | Save As & enter New report Name after done
See also
- Others Report Builder
- Fast Report
- Others Customisation