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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to replace Aged crystal functions with formulas???

Status
Not open for further replies.

request

Programmer
Dec 5, 2001
76
US
I have used the crystal functions Aged0to30days, Aged31to60days and so on in my crystal report.

However, I have to replace the above Aged functions with a formula that will calculate the 0-30 days, 31-60 days and so on using the database field steup_date as the reference instead of today's date as the reference point.

How can I do it?

Please help.

Thanks.
 
Create your own formulas:

{table.datetime} >= {table.setup_date}-29
and
{table.datetime} <= {table.setup_date}

Adjust accordingly.

This should work similarly.

-k
 
I am not sure what you mean by table.datetime. Please let me know.

Also, can you give me an example of atleast for 2 aging buckets.
aged0to30days
aged31to60days.

thanks a ton.
 
I tried to implement as per the suggestion

{table.def_date} >= {table.setup_date}-29
and
{table.def_date} <= {table.setup_date}

I put the above in a formula.

Now I want to create the summary total on this formula.
However, now when I right click on this formula is does not show me Insert->Summary option

Why??

 
How are you planning to use the formula? If you want to create a crosstab using the formula, then try something like this:

if datediff(&quot;d&quot;,{table.def_date},{table.setup_date}) in 0 to 30 then &quot;0 - 30 days&quot; else
if datediff(&quot;d&quot;,{table.def_date},{table.setup_date}) in 31 to 60 then &quot;31 - 60 days&quot; else
if // ....etc.

You could then use this as a column field in the crosstab, with the amount field as the summarized field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top