Crystal Reports Conditional Merge of Cross Tab Report

I have written a report that generates past due orders per machine for our manufacturing facility.  The report shows hours booked per machine, grouped by week end.  However, it is showing dates (week buckets) in the past.  I need to do an if statement to evaluate if the date field is less than today, i want to move that data to a new column names "Past Due".  I have a strong vba background and am quickly discovering that none of the vba language rules apply in crystal, unfortunately.

So far, I can do:

if desired_ship_date <today then

everything here doesn't work.

What would be the proper syntax to pass the cross tabbed data to a variable and insert a column titled "Past Due" and insert this data in that field?

Thanks so much!
LVL 1
Tina KSystems SpecialistAsked:
Who is Participating?
 
vastoCommented:
Sorry, I didn't make this clear. By "amount" I meant the database field, which contains the amount value. It is not necessary to declare a variable, just put the database field there
0
 
vastoCommented:
Create 2 formulas "past due"

if desired_ship_date <today then
  amount
else
  0

and another one, for example "non past due"

if desired_ship_date <today then
  0
else
  amount
0
 
Tina KSystems SpecialistAuthor Commented:
Crystal will not accept the variable 'amount', it's telling me that a number, currency, Boolean, date, etc... is expected.  I tried a dim statement to set amount as an integer, but then it tells me that the whole formula is not part of the remaining text.
0
 
Tina KSystems SpecialistAuthor Commented:
I realized again that I am in Crystal, not vba.  I used this as my dim statement:

Local NumberVar amount;

I'll  let you know how it goes!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.