Recent

Author Topic: How to use square brackets as string in lazreport column title  (Read 2525 times)

krzynio

  • Jr. Member
  • **
  • Posts: 73
Square brackets are used for defining variables.
How to use them as string in column header?
I.e. Route length [km]
Lazarus version: trunk. FPC version: 3.0.4. OS: Linux Debian Testing x64 with XFCE 4.12 and Windows 10 x64 version: 1709

Thaddy

  • Hero Member
  • *****
  • Posts: 8927
Re: How to use square brackets as string in lazreport column title
« Reply #1 on: May 25, 2017, 09:41:49 am »
Escape them. something like '''[''','''']'''
Most people that want to use threading should learn to patch their jeans first: use a needle.

krzynio

  • Jr. Member
  • **
  • Posts: 73
Re: How to use square brackets as string in lazreport column title
« Reply #2 on: May 25, 2017, 09:49:52 am »
I tried '''['''km. The result is ''''km. Bracket was eaten.
I also tried /[ \[ "[ but without success
Lazarus version: trunk. FPC version: 3.0.4. OS: Linux Debian Testing x64 with XFCE 4.12 and Windows 10 x64 version: 1709

paweld

  • Full Member
  • ***
  • Posts: 186
Re: How to use square brackets as string in lazreport column title
« Reply #3 on: May 25, 2017, 12:58:55 pm »
Code: [Select]
['[']
[']']
Best regards
paweld

krzynio

  • Jr. Member
  • **
  • Posts: 73
Re: How to use square brackets as string in lazreport column title
« Reply #4 on: May 25, 2017, 02:25:16 pm »
Thank you! Works like a charm.
How did you guess it?
Lazarus version: trunk. FPC version: 3.0.4. OS: Linux Debian Testing x64 with XFCE 4.12 and Windows 10 x64 version: 1709