Problem displaying variable inside brackets

edited 10:38AM in FastReport VCL 5
I'm trying to use a simple memo field to display a table column's caption, with the measurement units being used added in brackets after the caption itself. The final result I'm after in the report is something along the lines of:
Area (hectares)

The measurement units can vary from report to report, and the string to use for the units is being passed in as a variable giving a memo expression of:
Area ([UnitName])

However, when the report's viewed all that's displayed for the caption is "Area " - the bracketed variable contents and the brackets themselves don't show. If I take out the brackets things do display and I get "Area hectares", keep the brackets and add a space between them and the variable name and I get "Area (".

Could anyone advise on how to keep the brackets and display the variable's value?

Comments

  • gpigpi
    edited 10:38AM
    Attach your report template (fr3)
  • edited 10:38AM
    gpi wrote: »
    Attach your report template (fr3)
    Problem solved, with some embarrassment; the original .fr3 had too many complications to it to be worth attaching, and when I started making simple demo .fr3's, the same text started working.

    Looking more closely, the original problem was simply that I'd made the memo box too narrow; add the unit dimensions in too and that overflowed onto a second line which wasn't showing as it was (by design) an non-stretching memo. Make the box a bit wider, and everything displayed at it should...

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.