Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: help please Post Reply Post New Topic
Author Message
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Topic: help please
     Posted: 14 Nov 2009 at 2:53am
Hi All,


if {@Outage Duration}  < 60  then "Met" else "Missed"
 
this formula is working for one condition {@Outage Duration} only at a time.

I want to include both saying that look for {@Outage Duration} first if not found then look for {@Delayed Duration}

probsummarym1.close.time
probsummarym1.actual.close.time




{probsummarym1.close.time}
{@Delayed Duration}

{probsummarym1.actual.close.time}
{@Outage Duration}
1/7/2009  2:13:28 AM  
1/12/2009  12:13:11 PM  
1/28/2009  5:52:27 PM  
2/6/2009  2:17:48 PM  
2/6/2009  2:19:13 PM  
2/17/2009  10:37:24 AM  
2/26/2009  12:42:09 AM  
4/6/2009  10:03:10 AM 4/1/2009  9:00:00 PM
7/10/2009  10:28:09 AM 7/10/2009  10:27:39 AM
7/31/2009  5:16:14 PM 7/24/2009  1:00:00 PM
7/27/2009  6:02:53 PM 7/27/2009  6:02:02 PM
8/7/2009  12:37:26 PM 8/5/2009  7:59:00 PM
8/19/2009  5:05:30 PM 8/19/2009  5:05:07 PM
10/22/2009  12:55:06 PM 10/21/2009  10:00:00 AM

rp
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Nov 2009 at 2:37pm
if isnull(probsummarym1.actual.close.time) then your condition here
else
if {@Outage Duration}  < 60  then "Met" else "Missed"
IP IP Logged
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Posted: 15 Nov 2009 at 7:45pm
I tried the formula but its not working.

Here what i want to do:

1. Look for {probsummarym1.actual.close.time} if we have the data i.e. "4/1/2009  9:00:00 PM" then apply the {@Outage Duration}  < 60 and condition is "Met" and stop here and dont got  further.

2. Else we see no data in {probsummarym1.actual. close.time} then go to
{probsummarym1.close.time} and apply the formula
{@Delayed Duration} < 60 and condition is "Met"

rp
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Nov 2009 at 8:06am
if isnull(probsummarym1.actual.close.time) and
{@Delayed Duration} < 60 then "Met"
else
if isnull(probsummarym1.actual.close.time) and
{@Delayed Duration} >= 60 then "Missed"
else
if {@Outage Duration}  < 60  then "Met" else "Missed"
IP IP Logged
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Posted: 16 Nov 2009 at 7:12pm
Hi,

I tried yr formula but its still working on {@Outage Duration}  only and it do not go for {@Delayed Duration} which are highlighted in Bold.


{@Delayed Duration}       {@Outage Duration}     Condition

35        
33
       
676        
183        
1474                                           138                        Missed
32        
155                                              141                       Missed
47                                                47                         Met
184        
8        
10        
16   
     
8260                                             69                        Missed
178        
503                                               67                        Missed

            
rp
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Nov 2009 at 7:25pm
You may have to try and break the formula down and test its parts. It is hard to tell from here why it is not correctly applying the ISNULL portion.
You can try the formula to see if you get any value against the ISNULL
 
if isnull(probsummarym1.actual.close.time) then "NULL" else "NOT NULL"
 
did this correctly identify your rows with and without the time fields?


Edited by DBlank - 16 Nov 2009 at 7:26pm
IP IP Logged
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Posted: 16 Nov 2009 at 7:53pm
Hi,

This is what I found:

{@Delayed Duration}       {@Outage Duration}     Condition

35                                                                            NULL
33                                                                            NULL
676                                                                          NULL                        
183                                                                          NULL
1474                                               138                  NOT NULL
32                                                                            NULL
155                                                 141                  NOT NULL
47                                                    47                   NOT NULL

184                                                                          NULL
8                                                                              NULL
10                                                                            NULL
16                                                                            NULL
8260                                                69                  NOT NULL
178                                                                          NULL
503                                                  67                   NOT NULL




rp
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Nov 2009 at 7:16am
Well it seems to be usingt he ISNULL portion correctly. Now you can test the Delayed Duration portion:
if {@Delayed Duration} < 60 then "Met" else "Missed"
Is that correct or not?
If so the following should work, if not I am not sure where it is breaking at.
 
if isnull(probsummarym1.actual.close.time) and {@Delayed Duration} < 60 then "Met" else if {@Outage Duration}  < 60  then "Met" else "Missed"
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