Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 90
  • Last Modified:

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!
0
tkriegel
Asked:
tkriegel
  • 2
  • 2
1 Solution
 
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
 
tkriegelAuthor 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
 
tkriegelAuthor 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
 
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
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.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now