Lazarus

Programming => Packages and Libraries => LazReport => Topic started by: makgab on February 05, 2016, 08:27:26 pm

Title: LazReport float values display
Post by: makgab on February 05, 2016, 08:27:26 pm
Hi!
I would like to set the format of the numbers in report.
It is ok, I set it with format "1234,50" then the values appear well.
If I set the format "1 234,50" (thousend group) then the values appear wrong: 1?234,50
The '?' character appears. Why?

I use it like this:
Code: Pascal  [Select]
  1. ...
  2. DM.SQLQuery.Open; // report use this query -->  [DM.SQLQuery."field1"]
  3.  
  4. frReport.LoadFromFile('report.lrf');
  5. if ( not frReport.PrepareReport ) then Exit;
  6. for i:=1 to Copies do begin
  7.   FromPage:=1;
  8.   ToPage:=frReport.EMFPages.Count;
  9.   frReport.PrepareReport;
  10.   frReport.PrintPrepareReport( ... );
  11. end;
  12. ...
  13.  

What do I do wrong?
Title: Re: LazReport float values display
Post by: alexs75 on February 10, 2016, 11:54:48 am
on start  you propgram add this line:

  DefaultFormatSettings.ThousandSeparator:=' ';
Title: Re: LazReport float values display
Post by: makgab on February 10, 2016, 12:01:58 pm
Thanks! It works. :)
(I use it in mainForm OnCreate event.)