RT is a running total formula the syntax of RT is as follows RT("Name of the Running Total", "Function you are doing ie 'SUM'- 'FetchSum', "The field you are doing the running total on", and what is the grouping (this field is not used for the 'SUM' or 'FetchSum')
There are three components to the RT function:
1) the Sum which will sum the field specified (ie:RT ('g3gf_billsum','Sum',{Query.BILLED_AMT},'');
this will continue to sum the ,{Query.BILLED_AMT} until it is reset. This is placed in the section that Query.BILLED_AMT} field is.
2). The FetchSum is the function that will retrieve the subtotal of the SUM function.
(ie:RT ('g3gf_billsum','FetchSum',{Query.BILLED_AMT},'');
This is to be placed in the Group section where you want the sum to be displayed.
3) The ResetTotal is the function that will reset the Sum (ie: ResetTotal('g3gf_billsum'); This is to be placed in the group header that you are doing the running total for (If it is a Report total then it needs to be placed in the Report Header)
Note: this function was used before crystal reports had the running total wizard and is still used in some circumstances where the running total wizard does not work. It is a very good function but you cannot suppress any section that has any of the three formulas in it or it will not work.
I hope this is helpful and makes sense
Software support for MAS90/200 and Crystal Reports
If you don't have the funtion's dll on your pc, you may have to download the UFL library from the CD website. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.