Print Page | Close Window

Help with On-Time Delivery report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22763
Printed Date: 02 May 2024 at 5:56am


Topic: Help with On-Time Delivery report
Posted By: Beso90
Subject: Help with On-Time Delivery report
Date Posted: 18 Apr 2019 at 9:29am
Hi there,

I have an On-Time report that used to be very simple, the formula for the late field reads as:

if {@Ship Date Only} > {@Promise Date Only} then "Yes" else "No"

the {@Ship Date Only} and {@Promise Date Only} are DATE fields.

But now we have a customer that sends us requirements through EDI. Their Promise dates are usually on Mondays, but their truck doesn't show up until Tuesday.


I want to keep the formula above because it's working for all other customers. but i want it modified to include the argument of:

when {ARCUSTO.CUSTNO} = "BOGRMET" and the difference between the ship date and the promise date is 1, then it should be a "No".


I hope this makes sense.

Thank you



Replies:
Posted By: kevlray
Date Posted: 18 Apr 2019 at 9:35am
I think this is what you want, I may have the logic incorrect for BOGRMET:

if  {ARCUSTO.CUSTNO} = "BOGRMET then
 
if {@Ship Date Only} - {@Promise Date Only} = 1 then "NO" else "Yes"
else

if {@Ship Date Only} > {@Promise Date Only} then "Yes" else "No"


Posted By: Beso90
Date Posted: 18 Apr 2019 at 11:22am
I think this worked.

I will do more testing and see.

Thank you so much!


Posted By: Beso90
Date Posted: 22 Apr 2019 at 3:50am
Hi sir. For the early shipments, it shows yes for that customer. How do I fix that?

I basically want:
if ship date is earlier that promise date, it's no for everyone
if ship date is only one day later than promise date for the BOGRMET customer, it's a no.
if ship date is later than promise date, for everyone, it's a yes.


Posted By: Beso90
Date Posted: 23 Apr 2019 at 3:54am
I think I made it work..

if {ARCUSTO.CUSTNO} = "BOGRMET" then
(if {@Ship Date Only} - {@Promise Date Only} <= 1 then "No" else "Yes") else
if {@Ship Date Only} > {@Promise Date Only} then "Yes" else
if {@Ship Date Only} > {@Promise Date Only} then "Yes" else "No"


Posted By: Beso90
Date Posted: 23 Apr 2019 at 3:55am
I know the last two are redundant but that really what made it work



Print Page | Close Window