4

Good Morning.

I am trying to use Fast Reports v1.4.42

Everything was going well up until I attempted to concatenate a string.

I am trying to create a string that looks somewhat like the following.

1 - [Name Here]

2 - [Another Name]

3 - [Test Name]

I attempted to do this using the following code.

CType(Report.GetColumnValue("Table1.Code"), String) & " [" & CType(Report.GetColumnValue("Table1.Name"), String) & "]"

Unfortunatly as I already know using [Square Brackets] means that FastReports looks for variables with the name inside the brackets.

As such the fast report is looking for (using the example above), variables called Name, Here, Another, Name etc...

Is there a way of placeing [Square Brackets] into a fast report string without it falling over.

If it makes any difference I am using fast reports plugged into a VB.NET project.

Matt Skeldon
  • 577
  • 8
  • 23
  • 1
    Problem solved. Perhaps a little premature on this one. The brackets property for the textbox can be changed, allowing you to use square brackets. – Matt Skeldon Sep 28 '12 at 09:08

6 Answers6

4

The answer here is:

Remove the value from the Brackets property of the TextBox/Cell

Tobia Zambon
  • 7,479
  • 3
  • 37
  • 69
  • I am using FastReport VCL v4 and v5. In my case, instead of Brackets property, ExpressionDelimiters property is the cause. Instead of setting '[,]' for ExpressionDelimiters property, I set '[[[[,]]]]', which is rarely seen in my case, to turn off the expression feature. – sevenOfNine Mar 21 '19 at 08:09
2

for further information, u can check documentation, idk about .net but delphi documentation section is 2.5 of the user manual, where u can customize the delimiters using “ExpressionDelimiters” property

kabstergo
  • 761
  • 4
  • 16
2

It's very simple:
Just go select the text object from your report, then go to properties, then uncheck the property [Allow Expression] to be False.

Escape BRACKETS or Expression Snapshot

Willie Cheng
  • 7,679
  • 13
  • 55
  • 68
MBen
  • 29
  • 2
1

This is very simple for FastReport.Net this is working:

["[YourTextInSquareBrackets]"]
rafalkasa
  • 1,743
  • 20
  • 20
0

I have change bracket property from [,] to empty, it works! Please refer: a link

0

i've run into this same problem, i've tried @rafalkasa answer and it works.

text object value:

Hello ['['] [dataset.field] [']']

output:

Hello [Fast Report]

Allan.A
  • 27
  • 6