Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: I'm stumped... Post Reply Post New Topic
Author Message
riker
Newbie
Newbie
Avatar

Joined: 07 Dec 2010
Online Status: Offline
Posts: 16
Quote riker Replybullet Topic: I'm stumped...
     Posted: 04 Mar 2011 at 8:18am
I'm working on a report to show open jobs with a due date within a date range for a given department. The problem I'm running into results from poor reporting. An operation may have been completed just not reported. It then shows on the report even though it doesn't need to be. With that said, what I want to do is exclude a job if any of the proceeding operations have been completed.
 
I am very new to crystal and  can't seem to figure this one out. I know this isn't nearly enough info for anyone to help much, so any help would be appreciated.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Mar 2011 at 3:45am
YOu will have to explain your data and what that data means in terms of your condition of "exclude a job if any of the proceeding operations have been completed".
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 08 Mar 2011 at 3:21am
while I agree with DBlank, and you said it yourself, the description is vague, what I think you are looking for is where to filter out entries that are undesired.
 
If you are creating your report by selecting the tables in the report, then typically you would enter code to filter out unwanted rows.  This is typically done at Report/Selection Formulas/Record.
 
You would then enter the criteria for the records that you want to keep.  If this returns True for a record, it will be included in the report, if False, it will not.  CR will read through every record in the recordset that is originally selected.
 
HTH
IP IP Logged
riker
Newbie
Newbie
Avatar

Joined: 07 Dec 2010
Online Status: Offline
Posts: 16
Quote riker Replybullet Posted: 08 Mar 2011 at 8:31am
Thanks for taking the time to help me with this. I'll do my best to explain a little more.
 
I'm working with 3 tables that apply.
'jobhead' - General job detail
'joboper' - General operation details
'jobopdtl' - Specific operation details
 
Each operations has a resource group id - 'jobopdtl.resourcegrpid'.
100 = Cutters, 200 = Benders and so on...
 
Each operation is represented by a sequence number 'joboper.oprseq'.
Puts the ops in order from first to last. 10, 20, 30...
 
My selection criteria looks like this..
 
dateVar range d1 := {?Start Date} to {?End Date};
{jobhead.duedate} = (d1)
and
{jobopdtl.resourcegrpid} = {?Department}
and
{jobhead.jobcomplete} = 0
and
{joboper.opcomplete} = 0
 
This gives me all jobs for a specified department that are due with in a date range and are open with an operation that is still open.
 
As I said my problem is from poor reporting. The job might show operation 10 still open even though 20 has been completed. They couldn't have completed 20 if 10 wasn't done first.
 
So, How can I exclude a job if the proceeding operations have been completed?
 
Hope this helps...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Mar 2011 at 8:36am
do you actually need to exclude it or do you just need to not show it?
IP IP Logged
riker
Newbie
Newbie
Avatar

Joined: 07 Dec 2010
Online Status: Offline
Posts: 16
Quote riker Replybullet Posted: 08 Mar 2011 at 8:38am

As long as it doesn't show I'm happy.



Edited by riker - 08 Mar 2011 at 8:38am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Mar 2011 at 8:42am

group on resourcegrpid and order on oprseq

place your records to show in the group footer and it will only show the max one.
 
or
group on resourcegrpid and do a conditional suppression on the detail section
NOT(maximum(oprseq,resourcegrpid)) = oprseq
IP IP Logged
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