Dr. Serg
Dr. Serg

Reputation: 139

Display Yens in QuickReport

When I print a Currency field, I get '\0' instead of then Yen-sign (my regional settings are set to Japanese Format)

How can I display Yens in a Report in Delphi 6? (I can not use another version of Quick Reports)

Any idea is welcomed!

Upvotes: 0

Views: 892

Answers (1)

Johan
Johan

Reputation: 76641

You fixed the problem by doing

Font.Charset:= SHIFTJIS_CHARSET;

An alternative option is:

You can use the OnPrint event of the number you're printing and prefix the ¥ symbol.

Like so:

procedure TForm1.QRDBAnAmountPrint(sender: TObject; var Value: string);
begin
  //If the number doesn't have a currency symbol.
  Value:= '¥ '+Value;

  //If the number does have a currency symbol
  Value:= StringReplace(Value, "textforwrongsymbol", "¥");
end;

Upvotes: 1

Related Questions