Solved

Crystal Reports Conditional Merge of Cross Tab Report

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Find out what hardware you have and get the most up to date drivers from the manufacturer! Automatically Get Your Drivers There is a number of great programs that will detect your hardware and find drivers for you automatically! Here is a link …
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now