Solved

Crystal Reports Conditional Merge of Cross Tab Report

Posted on 2015-01-08
4
78 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Monitor network bandwidth hogs 8 82
No disk drive 17 99
PSTOOLS Office Activation Not Working 11 117
unzipping a password protected zip file without zipping tool (winzip) 18 107
One good source is the manufacturer's web site. Even though the device operating system is changing, the hardware isn't. Going to the support site and looking at the Vista drivers provides a starting point for identifying system hardware for which d…
I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

831 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