Subject Re: Quick Report
Author Frank Ingermann
Hi Jason,

--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> I'm trying to track down the problem with TIBOBCDField and QR. Where
can I get the sources to go through to find out why it is using the
column name instead of the proper value? Do you have to purchase some
sort of license to get their sources?

yes, you'll have to buy a license from QUSoft ( in
order to get a full source license.

> Is anyone at liberty to look through their sources to help me out
here? It seems to me that it must be doing some sort of hard cast to
the TField( ) somewhere because that is the behavior of a raw TField(
). The thing that most confuses me is that these methods are virtual
so I think something else I can resolve might be going on.

i'm afraid your suspicion is totally correct: the TQRDBText ctrl has a
Print() method, and it has the following lines in it:

if (Field is TFloatField) or
(Field is TCurrencyField) or
(Field is TBCDField) then
FPrintCaption := FormatFloat(Mask, TFloatField(Field).Value)!!!!

This of course gets Delphi to look at the wrong VMT to obtain the
GetValue entry point... typecasting the way it's *NOT* meant to be!

(btw. they do this the same way for all integer & datetime fields!)

only chance i see to workaround this is to restructure the IBOfields
in such a way that the VMT entry point for GetValue will match that of
TFloatField (---ouch! but should work...)