(→Steps) |
(→Steps) |
||
Line 8: | Line 8: | ||
:01. Click on '''SubRptNorm: Document_Detail''' | :01. Click on '''SubRptNorm: Document_Detail''' | ||
:02. Select the '''Variable''' button (the Calculator icon) | :02. Select the '''Variable''' button (the Calculator icon) | ||
:03. Click on the place to be print | :03. Click on the place to be print/shown. | ||
:04. Click on '''Calc''' Tab | :04. Click on '''Calc''' Tab | ||
[[File:RB-GetDirectDB-02.jpg|800 px|center]] | [[File:RB-GetDirectDB-02.jpg|800 px|center]] |
Revision as of 00:54, 5 November 2015
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)
- 01. Click on SubRptNorm: Document_Detail
- 02. Select the Variable button (the Calculator icon)
- 03. Click on the place to be print/shown.
- 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