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

Formatting Printed Parameter Ranges 1

Status
Not open for further replies.

slimshades26

Technical User
May 10, 2002
61
US
Crystal 8.5

The below varied formula was retrieved from the forum. I need it to be formated with no demicals or thousand comma.
It forced me to make it a string so that it why I have "ToText" in there. If I attempt to divide the parm it starts asking for "a number or currancy amount is required here". Any suggestions? Thanks!

{@PartRange}

"From: " + ToText(Minimum ({?Part#})) +
" To: " + ToText(Maximum ({?Part#}))


Result of formula is: From: 0.00 To: 9,999,999.00
Wanted Result is: From: 0 To: 9999999
ss26
 
Slim,

You need yourself a ,0 between your )).

Naith
 
I jumped the gun a bit. I still have the thousand commas. Can we remove those also? Thx. From: 302,000 To: 332,500 ss26
 
synapsevampire:

did not quite do the trick...it asks for a closing ")":

(ToText(Minimum ({?Part#}))),",","")

then when it is added it says "the remaining text does not appear to be part of the formula" and the cursor is directly after the added closing paren. leaving the commas and quotes hanging as well as the next line of maximum. Thanks for your response. Do you have another approach? ss26
 
Thank you very much for your patience! I did not know that replace was a "function". I thought you were suggesting I replace with the following portion. Wonderful. I added Naith's ,0 between my )) to cut back the decimals. Thx again both of you. ss26
 
Can't we get the same result by using this formula
"From: " + ToText(Minimum ({?Part#}),'####') +
" To: " + ToText(Maximum ({?Part#}),'####')

Thanks,
Hamida
 
you don't need a replace function just this will work

{@PartRange}

"From: " + ToText(Minimum ({?Part#}),0,"","") +
" To: " + ToText(Maximum ({?Part#}),0,"","")

this gets rid of a decimal place and thousand separator and has no decimals

Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top