| Author |
Message |
sue100
Newbie
Joined: 21 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 5
|

Topic: Manipulating String data Posted: 21 Nov 2013 at 12:34am |
I have a string that identifies key strokes of a database we currently use, this lists the user name, action and date/time of the event; when I run the report i get the following return:
18/10/2013 13:40:40: cullw(Actioned)<br>18/10/2013 13:39:34: lattai(With PHO)<br>18/10/2013 13:37:48: lattai(With PHO)<br>18/10/2013 13:37:29: lattai(Actioned)<br>18/10/2013 13:35:59: cullw(With PHA)<br>18/10/2013 13:20:43: cullw(With PHA)<br>18/10/2013 13:19:07: lattai(With PHO)<br>18/10/2013 13:02:46: lattai(With PHO)<br>18/10/2013 13:01:19: SeddonS2(With PHA)<br>17/10/2013 13:53:32: SeddonS2(With PHA)<br>17/10/2013 13:52:39: (New)<br> <br>Older records have been removed.
What i am trying to do is remove all references to '<br>' and replace the entry with commas as well as removing references to the statement 'older records have been removed'.
This will then be exported via csv into excel to allow a full manipulation of the data, including identifying time lines of each process etc. Edited by sue100 - 21 Nov 2013 at 12:34am
|
|
Many Thanks
Sue
|
IP Logged |
|
|
|
Sastry
Moderator
Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
|

Posted: 21 Nov 2013 at 2:34am |
Hi Use the following replace funciton : replace(replace({fieldname},'<br>',','),'Older records have been removed'," ") Then export to .csv
|
|
Thanks,
Sastry
|
IP Logged |
|
sue100
Newbie
Joined: 21 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 5
|

Posted: 21 Nov 2013 at 3:00am |
Thank you for your response.
I have inserted the above formula, however, I get e message stating "the result of selection formula must be a boolean"
|
|
Many Thanks
Sue
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|

Posted: 21 Nov 2013 at 4:22am |
you are likely placing the formula in the select expert. That is used for a boolean evaluation of eah row to include or exclude data from your report.
Create a formula field in the Field Explorer and use Sastry's formula there then place that formula field onto the report canvas to see the results. Edited by DBlank - 21 Nov 2013 at 4:23am
|
IP Logged |
|
kostya1122
Senior Member
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
|

Posted: 21 Nov 2013 at 5:48am |
|
shouldn't it be " instead of'
like
replace(replace({fieldname},"<br>",","),"Older records have been removed"," ")
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|

Posted: 21 Nov 2013 at 6:53am |
I think you can use either " " or ' ' unless the string you are replacing uses one or the other of these values in which case you would want to use the value that is not in the string.
Example string he said "Hello" need to replace "Hello" with Goodbye would be
replace(string,'"Hello"','Goodbye')
|
IP Logged |
|
sue100
Newbie
Joined: 21 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 5
|

Posted: 21 Nov 2013 at 9:40pm |
Thank you all so much for your help.
The forumla has worked a treat, now that I have put it in the correct place. 
|
|
Many Thanks
Sue
|
IP Logged |
|
sue100
Newbie
Joined: 21 May 2013
Location: United Kingdom
Online Status: Offline
Posts: 5
|

Posted: 21 Nov 2013 at 10:36pm |
I have now looked at the information that was bought across from Crystal to XL via CSV and it has only bought one record across multiple times.
After I create the forumlaa, where about in the canvas do I place it.
I am new to crystal and am still trying to find my feet.
Thank you
|
|
Many Thanks
Sue
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|

Posted: 22 Nov 2013 at 3:34am |
where you place it all depends on what you want to extract but my guess for what I think you might want is the detail section. The detail section will print once for every row in your data set.
If you placed in the report header it will only print one row (the first row) of the data set. Edited by DBlank - 22 Nov 2013 at 3:35am
|
IP Logged |
|
|
|