Subject RE: [IBO] TIBOTable Suggestion
Author Jason Wharton
Ok, here's what I've done on this.
If the column is simple SINGLE or DOUBLE PRECISION without any SQLScale then
I have to leave it open so that it will be treated as a floating point. So,
I'm checking if it is of integer type and giving it a display format that
locks it down as a whole number. If there are decimal places specified then
I am locking it down to present the value in that format.

If you want to BETA test the next release, and you are a registered
customer, then please send me a private email requesting the new release
that is up and coming.

I'm doing my best to get as many of the bugs/improvements in this release as
I can.

Regards,
Jason Wharton


> -----Original Message-----
> From: Hans Hoogstraat [mailto:hhoogstraat@...]
> Sent: Saturday, October 23, 2004 1:02 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] TIBOTable Suggestion
>
>
>
> Hello Jason,
>
> Currently, Decimal(18,2) values in a Grid connected to a
> TIBOQuery show up
> with the decimal place displayed anywhere in the displayed
> grid field, not
> lined up
> pretty with only two decimal placed as expected. Of courseyou
> can correct
> that by
> populating the TIBOQuery with the fields and adjusting the
> individual field
> display
> attributes. However, if the same TIBOQuery is used for
> various dynamically
> altered
> queries, you don't have this option available.
>
> Actually with the extra 0, this looks even better:
> if tmpCol.SQLscale >= 0 then
> (tmpField as TNumericField).DisplayFormat := '#0'
> else
> (tmpField as TNumericField).DisplayFormat := '#0.'
> +Copy('000000000000000000',1,-tmpCol.SQLscale);
>
> Probably all a matter of taste
>
> Best Regards
> Hans
>
> ----- Original Message -----
> From: "Jason Wharton" <jwharton@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Saturday, October 23, 2004 1:44 PM
> Subject: RE: [IBO] TIBOTable Suggestion
>
>
> |
> | Will you please tell me more why this is a benefit?
> |
> | I don't really understand why it should also override in
> the case that
> | someone placed a value in there that they want, which is
> what your code
> | would do.
> |
> | Jason
> |
> | > -----Original Message-----
> | > From: Hans [mailto:hhoogstraat@...]
> | > Sent: Friday, October 15, 2004 7:06 PM
> | > To: IBObjects@yahoogroups.com
> | > Subject: [IBO] TIBOTable Suggestion
> | >
> | >
> | >
> | > Hello Jason,
> | >
> | > I like to suggest the following code change to TIBODataSet.pas
> | >
> | > Around line 2915:
> | >
> | > // (tmpField as TNumericField).DisplayFormat :=
> tmpCol.DisplayFormat;
> | >
> | > change to
> | >
> | > if tmpCol.SQLscale >= 0 then
> | > (tmpField as TNumericField).DisplayFormat := '#'
> | > else
> | > (tmpField as TNumericField).DisplayFormat := '#.'
> | > +Copy('000000000000000000',1,-tmpCol.SQLscale);
> | >
> | > This change displays Numeric(x,y) fields using a
> | > DisplayFormat of (#.y(0's))
> | > on
> | > non field populated TIBOTABLES OR TIBOQUERIES (dynamic built SQL)
> | >
> | > Thank You
> | > Hans