Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Utilizing Two Independent Date Fields as Parameter Post Reply Post New Topic
Author Message
Charles Murphy
Newbie
Newbie
Avatar

Joined: 29 Jul 2015
Location: United States
Online Status: Offline
Posts: 3
Quote Charles Murphy Replybullet Topic: Utilizing Two Independent Date Fields as Parameter
    Posted: 04 Aug 2015 at 1:35am
I am very new to Crystal Reports (only a couple of months) and I am trying to create a report that is presenting a scenario that I don’t quite know where to begin.
I am using Crystal Reports XI and in my database I have a table {REQUEST} and within this table I have 4 date fields (DateTimeInit, DateSubmitTo, DateComplete and DateTimeClosed). I am trying to create a comparison report (with a chart) to reflect how many service requests were initiated during a date range (regardless of completion date) and how many service requests were completed during the same date range (regardless of the initiated date). What I have found is by creating an initiated start date and initiated end date parameter fields as well as creating a completed start date and completed end date parameter fields, they work together as an “AND” statement. This results in service requests that were initiated AND completed during the date range. I need the report to show ALL service requests that were initiated during the date range as well as ALL service requests that were completed within the same date range. Is this something that can be accomplished within Crystal Reports or will I have to use something like SQL Developer to create a “View” for my database?
Any help would be greatly appreciated. Thank you.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Aug 2015 at 7:52am
If I understand you correctly,
you can use an OR statement in the select process however that is still leaving you with only one row that may meet both conditions.
If you are trying to display items inside a grouping of one condition of the other you would not be able to do that without a sub report. Also, if a row can be in both categories you will need to handle that via some formulas or running totals.
Not really knowing the full scope of what you are trying to do I am not sure which approach would be better.
You might be able to handle it with a UNION to set a row under both conditions.
IP IP Logged
Charles Murphy
Newbie
Newbie
Avatar

Joined: 29 Jul 2015
Location: United States
Online Status: Offline
Posts: 3
Quote Charles Murphy Replybullet Posted: 04 Aug 2015 at 8:34am
I am using one table and within this table I will use the PROBLEMCODE field for group one (there are 4 problem codes that I need in the final chart), and I will use the DISPATCHTO field as group two (there are several employees that need to be in the final chart). I will use the DATETIMEINIT field in the details of the report (I would like this to be a parameter field that can be changed upon refreshing), and I will use the DATEDISPATCHTO field in the details of the report (I am thinking this needs to be another parameter field, although it will be the same dates as the DATETIMEINIT parameter fields). I will also use the REQUESTID field in the details (this is just the service request number, and will only be used in reference to answer any questions that arise).
The problem is that I need the two different date fields to be independent of each other, because we can have a service request that can be initiated within the date range but not completed within the date range and we can have a completed service request that is within the date range but may not have been initiated within the date range.
The end product that I would like to see is a bar graph that depicts the employees on the X-axis and each employee would have two bars (initiated and completed) and each bar would have 4 sections to it (the problem codes) with the values. I would also like to see a small summary of each employee and the average time (in days:hours:minutes format) that it took the employee to complete the four types of problem codes.
I hope this makes more sense.
Thank you for your previous response.
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.031 seconds.