开发者

Display Yens in QuickReport

开发者 https://www.devze.com 2023-03-04 13:25 出处:网络
When I print a Currency field, I get \'\\0\' instead of then Yen-sign (my regional settings are set to Japanese Format)

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 开发者_Python百科can not use another version of Quick Reports)

Any idea is welcomed!


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;
0

精彩评论

暂无评论...
验证码 换一张
取 消