[OT] Crystal Reports - Eliminate Trailing 0's


(system) #1
Adam,

Thanks for the reply.
I have tried to increase the number of decimal places and it worked but
didn't eliminate the trailing zero's.
In any rate I just received a function from Linda which eliminates the
zero's. Everything is under control now.
Thanks every one.


Mike Tonoyan / All American Products Co.
1135 Aviation Place
San Fernando, CA 91340
Tel.: 818-361-0059 Ext.: 220
Fax: 818-898-2236
e-mail: miket@...


----- Original Message -----
From: "aelinuxguy" <vantage@...>
To: <vantage@yahoogroups.com>
Sent: Tuesday, March 29, 2005 6:22 PM
Subject: [Vantage] Re: [OT] Crystal Reports - Eliminate Trailing 0's


>
>
> Mike,
>
> As long as the string value you are passing into the ToNumber function
> has the correct number of decimal places, the result will have the
> same number of decimal places. However, the default formatting for
> new fields is usually only two decimal places. Have you tried
> pressing the 'Increase Decimals' button on the formula with ToNumber
> in it?
>
> Adam Ellis - SaberLogic
>
> --- In vantage@yahoogroups.com, "Mike Tonoyan" <miket@a...> wrote:
>> Adam,
>>
>> Thank you for the reply.
>>
>> Our quote should show 0.155 for the price, this one time.
>> The {QuoteQty.DispUPrice} is a string value and when I am using
> ToNumber()
>> it returns only two place decimals.
>> ToNumber({QuoteQty.DispUPrice}) = 0.16
>>
>> {QuoteQty.DispUPrice} = 0.15500 text string
>> {QuoteQty.UnitPrice} = 0.16 number
>>
>> Is there any way to have ToNumber() to return 3 or 4 decimal places.
>
>
>
>
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/links
> Yahoo! Groups Links
>
>
>
>
>
>

(system) #2
Is there any way to format {QuoteQty.DispUPrice} field, in QuoteForm,
to show more than 2 decimal places if it has more, and show 2 place
decimal the rest of the time. In other words to get rid of trailing
zero's after 2 decimal places.

Mike Tonoyan / All American Products Co.
miket@...

(system) #3
Mike,

One way to do it would be to create a formula like so:

If {QuoteQty.DispUPrice}-Truncate ({QuoteQty.DispUPrice}, 2)>0 Then
ToText({QuoteQty.DispUPrice},4,"")
Else
ToText({QuoteQty.DispUPrice},2,"")

Hope this helps,
Adam Ellis - SaberLogic

--- In vantage@yahoogroups.com, "miket91326" <miket@a...> wrote:
>
> Is there any way to format {QuoteQty.DispUPrice} field, in QuoteForm,
> to show more than 2 decimal places if it has more, and show 2 place
> decimal the rest of the time. In other words to get rid of trailing
> zero's after 2 decimal places.
>
> Mike Tonoyan / All American Products Co.
> miket@a...

(system) #4
Adam,

Thank you for the reply.

Our quote should show 0.155 for the price, this one time.
The {QuoteQty.DispUPrice} is a string value and when I am using ToNumber()
it returns only two place decimals.
ToNumber({QuoteQty.DispUPrice}) = 0.16

{QuoteQty.DispUPrice} = 0.15500 text string
{QuoteQty.UnitPrice} = 0.16 number

Is there any way to have ToNumber() to return 3 or 4 decimal places.

Mike Tonoyan / All American Products Co.


----- Original Message -----
From: "aelinuxguy" <vantage@...>
To: <vantage@yahoogroups.com>
Sent: Monday, March 28, 2005 4:47 PM
Subject: [Vantage] Re: [OT] Crystal Reports - Eliminate Trailing 0's


>
>
> Mike,
>
> One way to do it would be to create a formula like so:
>
> If {QuoteQty.DispUPrice}-Truncate ({QuoteQty.DispUPrice}, 2)>0 Then
> ToText({QuoteQty.DispUPrice},4,"")
> Else
> ToText({QuoteQty.DispUPrice},2,"")
>
> Hope this helps,
> Adam Ellis - SaberLogic
>
> --- In vantage@yahoogroups.com, "miket91326" <miket@a...> wrote:
>>
>> Is there any way to format {QuoteQty.DispUPrice} field, in QuoteForm,
>> to show more than 2 decimal places if it has more, and show 2 place
>> decimal the rest of the time. In other words to get rid of trailing
>> zero's after 2 decimal places.
>>
>> Mike Tonoyan / All American Products Co.
>> miket@a...
>
>
>
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/links
> Yahoo! Groups Links
>
>
>
>
>
>

(system) #5
Mike,

As long as the string value you are passing into the ToNumber function
has the correct number of decimal places, the result will have the
same number of decimal places. However, the default formatting for
new fields is usually only two decimal places. Have you tried
pressing the 'Increase Decimals' button on the formula with ToNumber
in it?

Adam Ellis - SaberLogic

--- In vantage@yahoogroups.com, "Mike Tonoyan" <miket@a...> wrote:
> Adam,
>
> Thank you for the reply.
>
> Our quote should show 0.155 for the price, this one time.
> The {QuoteQty.DispUPrice} is a string value and when I am using
ToNumber()
> it returns only two place decimals.
> ToNumber({QuoteQty.DispUPrice}) = 0.16
>
> {QuoteQty.DispUPrice} = 0.15500 text string
> {QuoteQty.UnitPrice} = 0.16 number
>
> Is there any way to have ToNumber() to return 3 or 4 decimal places.