Subject | Re: negative floating point |
---|---|
Author | anthpjc |
Post date | 2003-07-29T00:03:11Z |
--- In IBObjects@yahoogroups.com, "anthpjc" <anthpjc@y...> wrote:
initially thought it was that, but on further testing it displays in
TIB_Edit and TIB_Grid...
> --- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...>wrote:
> > At 06:16 AM 18/07/2003 +0000, you wrote:the
> > >Hi there,
> > >I use IBO4_h.
> > >I have a TIB_Cursor which sums a float field, for some reason
> > >field returned is incorrect if it is a negative, e.g. the fieldTIB_Query
> > >is '.-4' rather than '-0.04', no matter what display format or
> > >editmask I set on the cursor, I have tried the same with
> > >with the same result. Any suggestions why this is happening andexample
> how
> > >it can be solved?
> >
> > I can't reproduce this in an ib_grid. Can you provide an
> of thematter
> > SQL involved and also a) what mask you have tried for its
> DisplayFormat
> > property and b) what control you are displaying it in?
> >
> > Helen
>
> Hi Helen,
> The sql query is:
>
> SELECT SUM(U.PAYTOTAL) AS TOTAL FROM MBUSERPAYMENT U
> LEFT JOIN MBPAYMENT P ON P.PAYMENTKEY=U.PAYMENTKEY
> LEFT JOIN MBPAYMENTDATA D ON D.PAYMENTKEY=P.PAYMENTKEY
> WHERE U.USERKEY=:ukey AND D.PROVIDERITEMKEY=:pkey AND P.STATUS=1
> AND D.PAYFORYEAR=2003 AND D.PAYFORMONTH=5
>
> The values that are summed are four -0.01's. The masks don't
> as the '.-4' result is the raw result. I think it may be the joins.....Sorry, the field is displayed in a FastReport report so I
> that are confusing it somehow as tests without the joins show
> correct results. Although it should only be concerned with data
> values while summing, not how it gets them. It can't be the
> variables as I've tested it with real values substituted. I'm
> stumped, maybe you can make some sense of it.
> You help is appreciated.
>
> anth
initially thought it was that, but on further testing it displays in
TIB_Edit and TIB_Grid...