Recent

Author Topic: LazReport float values display  (Read 2619 times)

makgab

  • Jr. Member
  • **
  • Posts: 55
LazReport float values display
« 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?

alexs75

  • Full Member
  • ***
  • Posts: 112
Re: LazReport float values display
« Reply #1 on: February 10, 2016, 11:54:48 am »
on start  you propgram add this line:

  DefaultFormatSettings.ThousandSeparator:=' ';

makgab

  • Jr. Member
  • **
  • Posts: 55
Re: LazReport float values display
« Reply #2 on: February 10, 2016, 12:01:58 pm »
Thanks! It works. :)
(I use it in mainForm OnCreate event.)

 

TinyPortal © 2005-2018