[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 619
  • Last Modified:

Creat running total refering to a formula with previous function

hi,
i'm trying to create a running total field count in my repoort.
i have created a formula that compares an amount field with its previus record amount and
the count needs to meet the condition.

however print time formulas cannot be used.

how can i bypass this?

thanks,
0
carlosmonte
Asked:
carlosmonte
  • 2
  • 2
2 Solutions
 
peter57rCommented:
You'll have to build the total in a normal formula field. Example below

whileprintingrecords;
numbervar x;
if {table.field} =previous({table.field} then x:=x+{somevalue};
""

When you want to print the total of x you create another formula field to do that:
whileprintingrecords;
numbervar x;
X
0
 
carlosmonteAuthor Commented:
and how do i reset count after every change of group#1?
0
 
peter57rCommented:
If the running total is for the group then you need a further formula field i the group header:

whileprintingrecords;
numbervar x:0;
""
0
 
James0628Commented:
A small correction:

 The second line in that last formula should be:

numbervar x:=0;


 James
0
 
James0628Commented:
I'd give all of the points to Peter.  My post was just a very simple correction, which Peter would have made himself if necessary.  It certainly doesn't deserve half of the points, and I don't really need any for such a small thing.

 James
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now