Dynamic Format of a TfrxMemoView
Hi,
using FR 3.06 demo version (part of an evaluation project) I am trying to dynamically format a TfrxMemoView that prints numeric values. Those numeric values are Prices & Percents. End-Users of my application defines in application parameters the format (number of decimals) for displaying Prices & Percents. So I need a way, to format numeric TfrxMemoView with the according format that my application knows.
I tried to do the following :
- in the report event handler "OnStartReport", I am trying to set the DisplayFormat property of the memo ...
... but when I run the script I get the error "Unknown type: TfrxFormat"
Am I doing something wrong ?
Is there any way to do this ?
Moreover I have cases that I will need to print a report of sale orders. Every order has its own currency. Every currency has its own display format (number of decimals are defined for every currency). So that format of the numeric fields of the order should be defined in every order record.
using FR 3.06 demo version (part of an evaluation project) I am trying to dynamically format a TfrxMemoView that prints numeric values. Those numeric values are Prices & Percents. End-Users of my application defines in application parameters the format (number of decimals) for displaying Prices & Percents. So I need a way, to format numeric TfrxMemoView with the according format that my application knows.
I tried to do the following :
- in the report event handler "OnStartReport", I am trying to set the DisplayFormat property of the memo ...
procedure frxReport1OnStartReport(Sender: TfrxComponent);
begin
 Memo9.DisplayFormat.FormatStr := '%2.2n';                                        Â
end;
... but when I run the script I get the error "Unknown type: TfrxFormat"
Am I doing something wrong ?
Is there any way to do this ?
Moreover I have cases that I will need to print a report of sale orders. Every order has its own currency. Every currency has its own display format (number of decimals are defined for every currency). So that format of the numeric fields of the order should be defined in every order record.
Comments
however a bug using the iif function was introduced, so if not using the iif function take a look at 3.07 or wait for 3.08
the easiest way to make multiple changes is to use the formatting functions
the format string portion can be a variable just set the variable to what you want when report starts.
I will try the new version. BTW does a bug fix list exists somewhere in order to be informed for the bug fixes in every version ?
thanks again.