"Invalid floating point operation" when ShowReport

DeYoDeYo Pozarevac, Serbia
edited 10:02PM in FastReport 2.xx VCL
I'm using Fast Report 2.5.3 and Delphi 7.

My problem: I have made Report (type Single). When I call Report from my program with frReport1.ShowReport for the first time it shows, but when I return to program and then try again I get the error message "Invalid floating point operation". Well, I need to have this work correctly becuse I need to enable more than one printnig in my program.

I have tried next
frReport1.LoadFromFile('file_name');
frReport1.PrepareReport;
frReport1.ShowPreparedReport;
same error.

then I have tried not to use Show methods, so I have inserted frPreview component and connected it with frRaport.
same error.

then I have tried dinamically
Form2:=TForm2.Create(Application)
report:=TfrReport.Create(Applicatio);
report.LoadFromFile('file_name');
report.Preview:=Form2.frPreview1;
report.PrepareReport;
report.ShowPreparedReport;
Form2.ShowModal;
Form2.Free;
report.Free;
same error

only thing that worked (partially) was when I have set frReport's property StoreInDFM to true, to avoid extra loading (!?). Only line of code was: frReport1.ShowReport. Well, now Report was showed first time and second time, but on third attempt - same error.

Error was appearing no matter what was stored in frReport (DetailBands, OLE Objects, RichEdit...).

Any ideas???

greska.jpg

Comments

  • DeYoDeYo Pozarevac, Serbia
    edited March 2005
    SOLUTION!!!

    What happens is that (for some reason) FastReport sometimes when saving Report sets first page's property Size to -1 (by default it's "A4 210 x 297 mm"). I don't why this happens but when I change the property back to default it all worked correctly.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.