Solved

Crystal Reports Conditional Merge of Cross Tab Report

Posted on 2015-01-08
4
77 Views
Last Modified: 2015-02-23
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
Comment
Question by:tkriegel
  • 2
  • 2
4 Comments
 
LVL 18

Expert Comment

by:vasto
ID: 40539576
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
 
LVL 1

Author Comment

by:tkriegel
ID: 40540149
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
 
LVL 1

Author Comment

by:tkriegel
ID: 40540160
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
 
LVL 18

Accepted Solution

by:
vasto earned 500 total points
ID: 40540551
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

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It is a common problem that often server suffers from the lack of space on system volume. Old servers or new ones from vendors come with preformatted small volume - 5-6GB in total and after installing updates or applications the free space on system…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question