Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: sort repeated incident Post Reply Post New Topic
Page  of 2 Next >>
Author Message
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Topic: sort repeated incident
    Posted: 21 May 2009 at 6:07pm
Hi All,

I have a database field {probsummarym1.brief.description} with following data:

1 03/03/2009 at 11:40:47 Process A is down on Shine1
2 03/03/2009 at 11:51:48 Process A is down on Shine1
3 03/03/2009 at 11:40:49 Process B is down on Shine2
4 03/03/2009 at 2:28:51 Process B is down on Shine2
5 03/03/2009 at 11:40:52 Process C is down on Shine3
6 03/03/2009 at 1:40:40 Process C is down on Shine3
7 03/03/2009 at 11:40:52 Process D is down on Shine3
8 03/04/2009 at 16:40:55 Process D is down on Shine3
9 beijing IS DOWN after pinging server
10 beijing IS DOWN after pinging server
11 honolulu IS DOWN after pinging server
12 honolulu IS DOWN after pinging server
13 saigon IS DOWN after pinging server
14 saigon IS DOWN after pinging server

I wanted to sort the data and bring the repeated incident so I created group on {probsummarym1.brief.description} but the problem is that its just bring the repeated data with the common heading like line no: 9,10,11,12,13,14 only but not the line 1...to 9.

Because the data in line 1..9 has different times that's why it do not bring the data in the report as you can see its a repeated incident with a different timing?

My question is how can I bring the data from line 1..9 in my final report  as well?

Please help me.

rp123
rp
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 May 2009 at 2:56pm
If I understand you correctly...
You will need to create a formula field from the string that strips data into a unified format for grouping and then group on the formula field.
That being said I am not sure how you are defining a "repeated incident" that you want to group together. My guess would be that you just need to strip out the date time part if it exists. If that is correct your formula field would be:
if isdate(left({probsummarym1.brief.description},10)) then
else {probsummarym1.brief.description}
 
IP IP Logged
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Posted: 22 May 2009 at 9:10pm
Yes you are right, I want remove the date time from the data?
Anyway I ran your formula its not removing the datetime from data.
rp
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 May 2009 at 7:13am
looks like I forgot the first condition ending...try:
if isdate(left({probsummarym1.brief.description},10))=true then
else {probsummarym1.brief.description}
 
if that does not work try:
if instr({probsummarym1.brief.description},"Process")>0 then
else {probsummarym1.brief.description}
IP IP Logged
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Posted: 27 May 2009 at 6:28pm
Hi,

I tried both formulas but its still working.

Thankx
rp
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 May 2009 at 7:50pm

Just to be clear here. You created a formula field with the formula of:

if isdate(left({probsummarym1.brief.description},10))=true then
else {probsummarym1.brief.description}
You placed this formula field on you report. THis formula field does not strip the date out.
What is it returning?
Also, do all of the rows that have a date in them also have the word 'Process'? 
IP IP Logged
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Posted: 27 May 2009 at 8:30pm
I created the formula and put it in my detail field.

So when I run the report it still bringing the same data w/o date/time strip off from the data.

The data with date/time format do not usually have a "process" field it can be anything like "patrol" or "host" etc.




rp
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 28 May 2009 at 12:54am
Hi
 
what i would suggest to the DBblanks formula is to replace the then part with below code and see if it works.
 
 
cheers
Rahul


Edited by rahulwalawalkar - 28 May 2009 at 12:56am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 May 2009 at 7:51am
Thanks Rahul.
RP, the formula I gave you was based under the impression that all of the "date rows" had the word 'Process' in them. It was looking for that word and trimming from that. Since this is not the case it was not working.
Rahul's suggestion is doing the same process but keying off the first time the ':' character appears reading right to left.
To avoid further confusion there are two things that must be in place for this to work for you.
1. When the row starts with a date there is never a : field to the right of the seconds indicator in the string we are trimming. You will have to scan your data to figure that out.
2. The first part of the formula is working which is looking a the first 10 characters and seeing if it is a date. You can create a formula field to check this. isdate(left({probsummarym1.brief.description},10))
If you put this in your report it should say TRUE for any date rows and FALSE for anything else.
IF both of these are OK then use Rahuls formula as:
 
if isdate(left({probsummarym1.brief.description},10))=true then
right({probsummarym1.brief.description},len({probsummarym1.brief.description})-instrrev({probsummarym1.brief.description},":")-2)
else {probsummarym1.brief.description}
 
Hope this clears it up for you.
IP IP Logged
rp123
Groupie
Groupie


Joined: 26 Feb 2009
Location: United States
Online Status: Offline
Posts: 47
Quote rp123 Replybullet Posted: 30 May 2009 at 7:27pm
Hi Guys,

Thanks a lot. Its working now.

I need some more help bcoz I have to create the charts based on repeated incidents:

1. Is there a way we can eliminate the single incidents and keep the repeated incidents in the report?

2. I want assign a single word to the incident .i.e.

Process H1 is down on qdvp14  --- list as "Process down" in the report
shine127 IS DOWN after pinging server - list as "server down" in the report
Instrument is down - list as "instrument issue" in the report
rp
IP IP Logged
Page  of 2 Next >>
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.