Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Displaying Numbers in FastReport

1,738 views
Skip to first unread message

Naser

unread,
Apr 13, 2008, 5:53:49 AM4/13/08
to
Hi, my database is mdb (Access) and I'm displaying the content of a table
into FastReport.
Data type of one field of the table is Number(Double).
some values of the field are integer and other values are floating
point(with 2 decimal places).
I want FastReport to show integer values WITHOUT decimal point character and
show non-integer values with decimal point values. I worked with
DisplayFormat property but haven't got any result.
any help is appreciated!


John Herbster

unread,
Apr 13, 2008, 9:23:46 AM4/13/08
to

"Naser" <n_fa...@yahoo.com> wrote
> ... floating point(with 2 decimal places) ...

An oxymoron? <g>
--JohnH

Naser

unread,
Apr 14, 2008, 7:35:24 AM4/14/08
to
I mean some values of the field are integers and other values are
doubles(not integer).

"John Herbster" <herb-sci1_AT_sbcglobal.net> wrote in message
news:48020965$1...@newsgroups.borland.com...

John Herbster

unread,
Apr 14, 2008, 8:22:43 AM4/14/08
to
>> ... I'm displaying the content of [Access] table into FastReport.
>>... floating point(with 2 decimal places) ...

"Naser" <n_fa...@yahoo.com> wrote


> I mean some values of the field are integers and other values are doubles(not integer).

Naser,

I do not know anything about FastReport. I hope that you get a response from someone who does.

But I have two questions:
(1) If I assume that the field in the table is of type "double" and that you are storing values into it like
"1", "2", "3", "1.23", "2.00", and "5.55", then on reading the table how do you think that you can distinguish the "2" from the "2.00"?
(2) Do you have access to the OnGetText event of the TField object for the field in question and does FastReport use the OnGetText output?

Regards, JohnH

Michael Philippenko

unread,
Apr 18, 2008, 10:40:57 AM4/18/08
to
Dear Naser!

Use IIF function for formatting of numbers.

--
Best regards,
Michael Philippenko mailto:mic...@fast-report.com
Fast Reports - Reporting must be Fast!
http://www.fast-report.com

Michael Philippenko

unread,
Apr 18, 2008, 10:43:12 AM4/18/08
to
Something like that
IFF(Value mod 1 = 0 , Format('%g',[value]), Format('%8.2f',[value]))

Naser

unread,
Apr 19, 2008, 7:00:06 PM4/19/08
to
thanks alot!
"Michael Philippenko" <mic...@fast-report.com> wrote in message
news:4808...@newsgroups.borland.com...
0 new messages