Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Auto-Incrementing Date Field Post Reply Post New Topic
Author Message
Paul Ledbetter
Newbie
Newbie


Joined: 24 Dec 2008
Location: United States
Online Status: Offline
Posts: 6
Quote Paul Ledbetter Replybullet Topic: Auto-Incrementing Date Field
    Posted: 24 Dec 2008 at 1:25pm
In my report I have information on parts that have been ordered.  I have the part number, date ordered, quantity ordered, date received, among others.  What I want to do is insert a custom field that gives me each day that had transpired beteen the Date Ordered and the Date Received.  I want one row for each intervening date, including the Date Ordered and the Date Received.  How can I do that?
Paul Ledbetter
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 26 Dec 2008 at 12:04pm

Am I right you dont want to calculate the days between the order and received dates? Am I right in understanding that you want to see on a separate row the dates between ordered for example the 12/21 and elivered for example 12/24? If so would it look something like this (?):

Date Order    Dated Received
12/21/2008    12/24/2008
 
Details
12/21/2008 - Sunday
12/22/2008 - Monday
12/23/2008 - Tuesday
12/24/2008 - Wednesday
 
Knowing how you  want the data to be presented will help those on the forum answer the question. At least it will me.
 
Regards,
 
John W.
IP IP Logged
Paul Ledbetter
Newbie
Newbie


Joined: 24 Dec 2008
Location: United States
Online Status: Offline
Posts: 6
Quote Paul Ledbetter Replybullet Posted: 29 Dec 2008 at 1:17pm

Hi. Thank you for your response. Basically, I want to be able to know how many parts are on order on a given date. So if I have the following:

Part No. PO Num Date Date Ordered Date Rcvd On Order?
R123456 45123 6/12/2008 6/12/2008 6/18/2008 1
R123456 45123 6/13/2008 6/12/2008 6/18/2008 1
R123456 45123 6/14/2008 6/12/2008 6/18/2008 1
R123456 45123 6/15/2008 6/12/2008 6/18/2008 1
R123456 45123 6/16/2008 6/12/2008 6/18/2008 1
R123456 45123 6/17/2008 6/12/2008 6/18/2008 1
R123456 45123 6/18/2008 6/12/2008 6/18/2008 0
R123456 54666 8/2/2008 8/2/2008 8/7/2008 1
R123456 54666 8/3/2008 8/2/2008 8/7/2008 1
R123456 54666 8/4/2008 8/2/2008 8/7/2008 1
R123456 54666 8/5/2008 8/2/2008 8/7/2008 1
R123456 54666 8/6/2008 8/2/2008 8/7/2008 1
R123456 54666 8/7/2008 8/2/2008 8/7/2008 0
C765434 44444 6/15/2008 6/15/2008 7/23/2008 1
C765434 44444 6/16/2008 7/15/2008 7/23/2008 1
C765434 44444 6/17/2008 7/15/2008 7/23/2008 1
C765434 44444 6/18/2008 7/15/2008 7/23/2008 1
C765434 44444 6/19/2008 7/15/2008 7/23/2008 1
C765434 44444 6/20/2008 7/15/2008 7/23/2008 1
C765434 44444 6/21/2008 7/15/2008 7/23/2008 1
C765434 44444 6/22/2008 7/15/2008 7/23/2008 1
C765434 44444 6/23/2008 7/15/2008 7/23/2008 0
 
I can see that between 6/15/2008 and 6/18/2008, I had R123456 and C765434 on order.  I only have the Date Ordered and Date Delivered available to me.  I need to be able to imbed the auto-incrementing date field that starts with the order date and ends with the date received for any given PO (and line number of course but I was just giving you the trivial exaple).  That way I can create a Formula that tells me whether or not something was on order on a given date.
Paul Ledbetter
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Dec 2008 at 1:50pm
Paul, I am still a little unclear on exactly what you are trying to do here.
If you only want the report to only show you items that were on order on a specific date you can do this by creating a parameter and comparing that parameter against your data.
For example if I am reading this correctly you can create a date parameter and in your selection expert have the {?Date} in {DAte ordered} and {Date Rcvd} and {on order}=1.
This would remove everything else from the report.
IP IP Logged
Paul Ledbetter
Newbie
Newbie


Joined: 24 Dec 2008
Location: United States
Online Status: Offline
Posts: 6
Quote Paul Ledbetter Replybullet Posted: 29 Dec 2008 at 2:20pm
DBlank,
Don't forget that the 1's and zeroes in the [On Order?] field is derived from the fact that I *somehow* have the incrementing field in-place.  I would not be able to establish whether or not a part was on order if I didn't have the date to begin with.  I am trying to come up with a way to present the incrementing date field in the first place.
Paul Ledbetter
IP IP Logged
Paul Ledbetter
Newbie
Newbie


Joined: 24 Dec 2008
Location: United States
Online Status: Offline
Posts: 6
Quote Paul Ledbetter Replybullet Posted: 29 Dec 2008 at 2:22pm
This is what I have to work with:
Part No. PO Num Date Ordered Date Rcvd
R123456 45123 6/12/2008 6/18/2008
R123456 54666 8/2/2008 8/7/2008
C765434 44444 6/15/2008 7/23/2008
 
I want to get to the result stated previously.
Paul Ledbetter
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Dec 2008 at 2:37pm

2 questions.

1- Do you want to excude data based on a condition or just show a result like in your "On Order?" column in your above example.
2- Where is the "Date" field coming from in your results example above? Is this the parameter that the user enters? If so how are you getting such an array of dates? your original indacted you just want to know this for a specific date.
I'll need to know these items to help you.
Thanks.
IP IP Logged
Paul Ledbetter
Newbie
Newbie


Joined: 24 Dec 2008
Location: United States
Online Status: Offline
Posts: 6
Quote Paul Ledbetter Replybullet Posted: 30 Dec 2008 at 4:22am
1.  I want a display just like my first example, minus the [On Order?] column.
 
2.  The [Date] field is precisely the reason for this thread in the first place.  That is what I'm after.  I want to know if it is possible to create an auto-incrementing Date ([Date] in my example) field in Crystal Reports that can be coded to start at the [Date Ordered] and end at [Date Received] for a given Part and PO number.
Paul Ledbetter
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.