formetting variable inside a richview

Hello,

Inside a tfrxrichview, if I use a variable say myvariable, which is declared in the report variables, I can get the value fine, but I cannot use an inline formatting. If I write inside the rich text [myvariable] everything is file, if I try to add inline formatting [myvariable #n%2.2f] I always get an error 'error in expression 'myvariable #n%2.2f' : ; expected

And of course, adding a semicolon, does not change anything

How can I get a variable containing an amount to be formatted with 2 decimals ?

thanks for your ideas

Didier

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:27PM
    of course the ; is just telling you there is an error in the syntax.
    try
    [(<myvariable>)#n%2.2n]
  • edited 1:27PM
    gordk wrote: »
    of course the ; is just telling you there is an error in the syntax.
    try
    [(<myvariable>)#n%2.2n]
    Gord,

    I get exactly the same error message.
    - I have been careful to add a space before the #
    - I tried with and without the angled brackets
    - I tried with and without the parenthesis, just in case

    I am using the exact same syntax in a 'regular' tfrxmemoview and it is just fine;
    As a workaround I tried formatting the variable before storing it but then any formatting just disappears when the variable is printed by FR.

    The only thing that works is to make sure that the variable is a string, then FR leaves it alone & prints it as supplied. But this forces me to rewrite a somewhat complex piece of SQL query which I wanted to avoid doing


  • gpigpi
    edited 1:27PM
    Try
    [(<myvariable>) #n%2.2n]
    See attach
  • gordkgordk St.Catherines On. Canada.
    edited 1:27PM
    Paul, Didier is correct it is not working in the rtf memo, you used a standard memoview in your test.
  • gpigpi
    edited 1:27PM
    Sorry, but TfrxRichView doesn't support inline formatting at this moment
  • gpi wrote: »
    Try
    [(<myvariable>) #n%2.2n]
    See attach




    Thanks for the attachment.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.