Oct 05 2010

Create Running Totals in BI Publisher (XML)

VN:F [1.9.22_1171]
Rating: 3.5/5 (2 votes cast)

Definition : A dictionary meaning of Running Total is a total that is continually changing to account for added items. In Financial terms it is cumulative total of records up to and including the current amount. If you want to know more about it, these are the sites to have a glance once.



Example of Running Total: A florist store’s sales and its Running Total

Flower Sales Running Total
Tulip 100 100
Lavender 200 300
Daffodil 300 600

How to use Running Totals in .rtf:

Considering two fields again Address Number and Amount, we are going to calculate the Running Total.

Syntax :

<?for-each: A_P_Detail_Reports_S1?>

AddressNumber_ID4 t.00 rt tt.00

<?end for-each?>

Property and Explanation for fields:

1) RT

RT Variable

Field Syntax Explanation
RT <?xdoxslt:set_variable($_XDOCTX,’RT’,0)?> Declaring a variable named “RT” variable and initializing it with value 0

2) AddressNumber_ID4

Field Syntax Explanation
AddressNumber_ID4 <?AddressNumber_ID4?> Address Number field which is directly picked from the Business View

3) t.00

Field Syntax >Explanation
<?xdoxslt:get_variable($_XDOCTX,’RT’)+ translate(AmountGross_ID6,’,’,’.’))?>
Concept of Setters and getters are used here using the Set and Get approach for assinging and incrementing the values.The syntax will add the current value to be summed up. The Amount value has been translated as XML expects the Raw Data.

4) tt.00




tt.00 <?xdoxslt:get_variable($_XDOCTX,’RT’)?> This Syntax is use to retrieve the Value.

Final Output

Use :

Running Totals are mostly used in Financial world to find out the as of now total simultaneously. In our technical world we can use it for assigning the Serial Number or say Count (serialized line number) in that case.

Published under the license.

VN:F [1.9.22_1171]
Rating: 3.5/5 (2 votes cast)
Create Running Totals in BI Publisher (XML), 3.5 out of 5 based on 2 ratings
(Visited 1,693 times, 1 visits today)

About the author

Sonal Teke

Sonal Teke is a Senior Oracle BI Consulatant, a provider of value-added technical services to EnterpriseOne customers. She has over 5 years of experience in areas that include JD Edwards EnterpriseOne Technical, Oracle BI tools, Service Oriented Architecture (SOA), and training. Sonal is a certified EnterpriseOne Technology Consultant.

Leave a Reply