Problem displaying variable inside brackets

edited 9:55PM 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 9:55PM
    Attach your report template (fr3)
  • edited 9:55PM
    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