Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parse Specific Data From Memo Field/Crystal 9.0

Status
Not open for further replies.

mrichey

MIS
Nov 22, 2002
71
US
Hi, using Crystal Version 9.0 against a P4 database. The data below is in a memo field. I need help creating a formula to parse only lines with "LogicalDisk" in the line. I need all data on the line all the way to the 15m.

Example, for below would want to see this:
e w2k_LogicalDisk PrcFreeSpace "C:" 15m
e w2k_LogicalDisk PrcFreeSpace "D:" 15m
e w2k_LogicalDisk FreeMegaBytes "C:" < 100: critical 15m


Thanks for any help!



e w2k_memory committed bytes > 90: critical
15m
e w2k_processor prcprivtime "0"
15m
e w2k_memory committed bytes > 90: critical
15m
e w2k_LogicalDisk PrcFreeSpace "C:"
15m
e w2k_LogicalDisk PrcFreeSpace "D:"
15m
e w2k_memory committed bytes > 90: critical
15m
e w2k_LogicalDisk FreeMegaBytes "C:" < 100: critical
15m
 
Use the like operator to locate the data then the left function to display only those characters needed. Example:

if {memofield} like ['*LogicalDisk*'] then left({memofield},15) --or how ever many characters need to be displayed.
 
Hi Gramm, thanks for the reply. I got that far but, not being a programmer, can't determine how to get the subsequent occurences of Logical Disk as well.
 
Try the following which should get you close:

numbervar i;
numbervar j := len({table.string});
stringvar x := "";

for i := 1 to j do(
if i+10 < j then
if {table.string}[i to i+10] = "LogicalDisk" then
x := x + mid({table.string}, i-6,(instr(mid({table.string}, i-6),"15m")+3))+
chr(13));
x

You would have to format this to "can grow".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top