Jump to content
Software FX Community

Problem: "Invalid floating point operation"


User (Legacy)

Recommended Posts

Hello! 

I'm using Chart Fx 98 Active Control (Build 4.0.11.00) with

C++Builder 3.0 Patch 1. When I'm trying to open a Query, Chart Fx closes

my aplication and raises the following error message:

"Invalid floating point operation"

I'm using the Chart Fx component within one TForm MDIChild into one

DLL; it requires calling CoInitialize() before creating the TForm

MDIChild, and so I do. Everything goes perfect until I use any floating

point series:

SELECT u.nick, AVG(i.ventas) AS PROMEDIO

FROM ingresos i, usuarios u

WHERE i.cajero = u.usuario AND i.Tienda = '01'

AND i.fecha BETWEEN '01/01/80' AND '12/12/99'

GROUP BY u.nick

NICK PROMEDIO

==============================

Juan 2181.39285714286

Miguel 545.282352941176

Ricardo 1007.14117647059

ChartFX1->DataType[0] = CDT_LABEL;

ChartFX1->DataType[1] = CDT_VALUE;

I've set the Decimals property to 2 into the X and Y axis:

ICfxAxisDisp cfxEjesX, cfxEjesY;

ChartFX1->Axis->get_Item(AXIS_Y,&cfxEjesY);

cfxEjesY.Decimals = 2;

cfxEjesY.Format = AF_NUMBER;

ChartFX1->Axis->get_Item(AXIS_X,&cfxEjesX);

cfxEjesX.Decimals = 2;

cfxEjesX.Format = AF_NUMBER;

But it doesn't repair the error.

Do I need to do something else before calling CoInitialize function?

Making the same testing not into one DLL, but into one TForm within an

EXE, it works very well. I'm not using any Chart Fx component into the

EXE, just into the DLL. As you know, every DLL in Builder has got its

own TApplication object, that's why I think is necessary calling

CoInitialize. If the Chart Fx component is used into one TForm within

the EXE, is no necessary calling that function, and so the error message

is not raised.

Hoping you to help me.

Regards,

Marco

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...