×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Trying to show promised deliveries for prior 3 months

Trying to show promised deliveries for prior 3 months

Trying to show promised deliveries for prior 3 months

(OP)
I'm using Crystal Reports 2011 with an SQL database.
I'm having a tough time trying to show the prior 3 months promised deliveries when the current month is January. The reason is because the promised dates are in the prior year (Oct, Nov and Dec). The report has 12 subreports, 1 for each month so it's really only the Oct, Nov and December subreports that are effected. The main report really doesn't have anything on it except all of the Sales Order deliveries for all time. Which I use only as a place holder. The 12 subreports are in the Main Report footer and based on the current month the prior 3 months subreports are visable. The issue I'm having is getting the Oct, Nov and Dec subreports to select the prior years data when the current month is either Jan, Feb or Mar. I've tried a few record selection formulas but not getting the correct month's promised dates.

Any help would be greatly appreciated!!

RE: Trying to show promised deliveries for prior 3 months

Use the dateadd function—it will automatically adjust for the year.

-LB

RE: Trying to show promised deliveries for prior 3 months

(OP)
LB,
I used your formula from a different thread and it seems to work fine for what I am trying to accomplish. Below is the formula.

{SO_Detail.Promised_Date} in DateAdd("m",-3,currentdate-day(currentdate)+1) to dateadd("m",-3,currentdate-day(currentdate)+31)

Thanks for your help.
Brad

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close