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 3:09AM
    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

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.