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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seperating strings values

Status
Not open for further replies.

Monkeyboy126

IS-IT--Management
Dec 9, 2002
47
GB
Hi

I have a Help Desk call logging database. The categories to which are are assigned are done in the following manor:

Toplevel.midlevel.lowlevel (software.OS.W2K)

Using drill down I want the report to show top level first, drill down to toplevel.midlevel and lastly (yes you've guessed it) toplevel.midlevel.lowlevel

The field with the data value for the category is always 3 levels seperated by a full stop.

I'm grouping by these levels and eventually want to display total volume numbers for each level.

Any help would be greatly appreciated.

Thanks


Paul
 
Hi
insert count field on your report
and make a running total

Sum(field_name,groupName)
hope this help

pg
 
Lets assume that you have a field called {hd.info} that conatins the data.
It's stored the way you describe it with a period separating the different bits of info in each field.

You could write a formula to separate this field into 3 parts.
Local Stringvar s := {hd.info} ;
Local NumberVar p1 := Instr(s,".") ;
Local NumberVar p2 := InstrRev(s,".") ;
Stringvar a := Mid(s,1,p1 -1) ;
StringVar b := Mid(s,p1+1,p2 - p1 -1) ;
StringVar c := Mid(s,p2+1);


Then you could create 3 formulas that reference these varaibles and group on these.
eg
@Group A
If {hd.info} = "Some Stuff so the formula works"
Then ""
else
StringVar a

@Group B
If {hd.info} = "Some Stuff so the formula works"
Then ""
else
StringVar b

@Group C
If {hd.info} = "Some Stuff so the formula works"
Then ""
else
StringVar c

Good luck.


HTH
Bob Suruncle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top