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

create a bullet list in a field 2

Status
Not open for further replies.

hatemgamil

Programmer
Mar 18, 2010
41
0
0
hi all

i have a field name "Main Causes" and it's value in my report always looks like that

Main Casuses
---------------------------------------
brake defect,wrong signal,kkllk,dd

i want to make it looks like a bullet list
•brake defect
•wrong signal
•kkkllkl
•dsd

i want some help to do so

thnx
 
i have did something that gives what i am looking for

creating a formula

"• "&replace({dt.MainCauses_En},',',chr(13)&"•")

chr(13) which means Enter button
but the problem in this solution that it adds
a bullet like this:
•brake defect
•wrong signal
•kkkllkl
•dsd

 
maybe something like this...

IF not(onlastrecord)
then
"• "&replace({dt.MainCauses_En},',',chr(13)&"•")
else
"• "&replace({dt.MainCauses_En},','," ")
 
Is there a final comma at the end of the list? (you don't show one in your example)
If so, then strip it off and then do the replace.
Code:
Local stringVar x := {dt.MainCauses_En} ;
if Right(x,1) = "," 
then "• " & Replace ( Left(x,Length(x) -1),"," , chr(13)&"• " )
else "• " & Replace (x ,"," , chr(13)&"• " )

Should be close to being right.


Bob Suruncle
 
stringvar x := "• " & replace({dt.MainCauses_En},',',chr(13)+"• ");
left(x,len(x)-3)

-LB
 
thnx all

thnx lbass i did what u sent and it works perfectly

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top