Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A/R formula

Status
Not open for further replies.

jmd0252

Programmer
May 15, 2003
667
Since this is the formula form,, I need a formula to do A/R - Accounts Receivable ageing.. I have looked at the 0to30 age function, but when I write my formula I get an error. It highlights the function and says it expects a sting value.. Does mean that my value I am trying to age is not a sting?? It is a date in the following format 20080101. Ideas, suggestions??
 
Please post your formula.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
ok The invoice amt and payment amt are in the same file record,, so i am fortunate,, so I calculate an amount due by the following.

{AR_TRANSDETAIL.AMOUNT_DUE} + {AR_TRANSDETAIL.PAYMENTS}

since and simple,, then I want to add that into my ageing buckets.

If {AR_TRANSDETAIL.INVOICE_DATE} In Aged0To30Days
then {@due} else 0

and I get an error that says "a string is required here", and highlights the In Aged0to30Days.

Suggestions????
 
You need to determine the datatype of your date field. Right click on it and select "browse data" and see whether the datatype is a string or a number, and then report back.

-LB
 
ok,,, when I do as suggested it come back string length 8.
 
Please post sample data of {AR_TRANSDETAIL.INVOICE_DATE}. We need to convert this to a date.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Convert your string date to an actual date like this:

//{@date}:
stringvar x := {table.stringdate};
cdate(val(left(x,4)),val(mid(x,5,2)), val(right(x,2)));

Then use a conditional formula like this:

if {@date} in Aged0To30Days then
{@due}

-LB
 
IN the original post the date format is 20080101, as an example
 
Is this a string, or a number?

Your original post does not indicate this.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Have not got there yet,, I will try to get there today, and get back with the results, thanks for your concern..
 
before we go any farther I am using XI release 2,,, is this the proper forum??
 
Yes. Please respond to the questions if you want help.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
//{@date}:
stringvar x := {AR_TRANSDETAIL.INVOICE_DATE};
cdate(val(left(x,4)),val(mid(x,5,2)), val(right(x,2)));

if {@date} in Aged0To30Days then
{@due}

OK this is my formula now,,

the editor say "this field name is not know",, and it highlights the {@date} in the aged0to30days statement.
 
Those are two separate formulas--the first is {@date}, and the second is the conditional formula you wanted to use.

-LB
 
ok,, works a lot better now that I know they are 2 different formaulas,,, thanks a bunch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top