Topic: customer statement Posted: 25 May 2014 at 8:28am
Hello,
i want to generate report to get customer statement sheet for specified period
i want to calculate the statement for the previous duration
i create a formula
whileprintingrecords;
if {CreditMovements.MoveDate}<{?dat} then
(
if {CreditMovements.CreditType} =1 then
(
currencyvar open := open - {CreditMovements.CreditAmount};
shared currencyvar openduration := openduration - {CreditMovements.CreditAmount};
)
else
(
currencyvar open := open + {CreditMovements.CreditAmount};
shared currencyvar openduration := openduration + {CreditMovements.CreditAmount};
)
)
else
(
if {CreditMovements.CreditType} =1
then
(
currencyvar open := open - {CreditMovements.CreditAmount};
)
else (currencyvar open := open + {CreditMovements.CreditAmount};)
)
but i want the openning balance to be on the head
Joined: 05 Dec 2013
Online Status: Offline
Posts: 50
Posted: 18 Jun 2014 at 6:07am
Use "global currencyVar open;" after "whileprintingrecords;" in your formula to make it available report wide.
Create
a separate formula for your report header that also has "global
currencyVar open;" followed by "open" to display the value you
calculated in the original formula.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 19 Jun 2014 at 5:07am
I have heard that the default is shared, which is actually a larger scope then Global.
As a simple change, you could move the currencyvar open out of each part of the if statement and just put it at the top...then just assign to the value.
Joined: 05 Dec 2013
Online Status: Offline
Posts: 50
Posted: 14 May 2015 at 9:40am
I'm a bit stumped. My best guess is that the header formula is being executed before the formula that calculates the data you are looking for, in which case the calculations may be occurring after the value is displayed, but that's a shot in the dark.
To test this, you might try doing a Grouping on a distinct value. What this will do is give you a Group header that you can hijack for what is currently in your Report header, since your Details will remain unchanged as long as what you are Grouping on does not have any "like" values within that data subset.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum