Report Builder - Doing Simple Calculation: Difference between revisions

From eStream Software
(Created page with "==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...")
 
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
Below is example using Sales Invoice to get Net Unit Price (after Discount)
Below is example using Sales Invoice to get Net Unit Price (after Discount)


===Using Variable===
[[File:RB-SimpleCalc-01.jpg|800 px|center]]
[[File:RB-SimpleCalc-01.jpg|800 px|center]]
: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]]
Line 25: Line 24:


==See also==
==See also==
* Others [[Report Builder]]
* [[Report Designer]]
* [[Fast Report]]
* Others [[Customisation]]
* Others [[Customisation]]

Latest revision as of 07:47, 17 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)

RB-SimpleCalc-01.jpg
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
RB-GetDirectDB-02.jpg
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