So is your report one that only shows negative usage?
You could do something like:
global numbervar nUsage:=0;
global numbervar nUsage:={usage}-next{usage};
nUsage;
or even just:
{usage}-next{usage}
You will have to be sure that {usage} is a currency or amount though.
This will work if you are trying to show usage starting with the first records. For instance, in your example, this would yeild 200 for date 9-5-09. If you wanted it the other way around change Next to Previous.
One problem you may have though is when the formula doesn't have a next or a previous record to calculate. Such instance would be true for the last record with Next and the first record with Previous. You could start with this and move on from there.
Another idea would be to use nextisnull and previousisnull. Something like:
global numbervar nUsage:=0;
global numbervar nUsage:={Usage}- (if nextisnull({Usage}) then
{Usage} else next({Usage}));
nUsage;
This should give you an amount of 0 if there is no next usage field (replace nextisnull with previousisnull if you are doing it the other way).
Once you have the usage calculated, suppress detail sections where nUsage>0.
Hope this helps or at least gives you some ideas.
Edited by FrnhtGLI - 25 Sep 2009 at 6:12am