Expression not evaluating

edited November 2014 in FastReport .NET
I want to combine two database fields (first and last name) together with a space in between.
I drag-dropped the first name field onto the report and then double-clicked it.
The "Edit Text" box appears.

I then changed it so it appears as follows:

[resident.first_name] + " " + [resident.last_name]

I then clicked OK and clicked Preview.

But, instead of evaluating the above expression, it just dumps it out literally as is as text.

What am I doing wrong? How do I get it to evaluation the expression and show the results from my database records?

BTW, I have C# checked as my language option, and when it is only [resident.first_name] it evaluates and prints the first name from the database record on the report.
I have the property "AllowExpression" set to TRUE.

I want another expression from a numeric field in my database record. It's a 6-digit number that I need to drop the first digit.
So I put
[resident.ResidentID] % 100000
in the "Edit Text" dialog box, but again, instead of evaluating, it just prints out the above as text.

Comments

  • edited 4:39PM
    I figured it out. If you want an expression to evaluate, you have to surround the whole thing with another set of square brackets

Leave a Comment