Page 1 of 1

CONCATing a field for a report

Posted: Fri Jan 19, 2018 11:56 pm
by mikep345678
I need, in a report I'm building, to combine two columns (cust_LastName and cust_FirstName), into one report field (to be used as a group header and report ORDER BY-- I don't want the report simply sorted by "cust_LastName", I want it sorted and grouped by "cust_LastName, cust_FirstName").

In other places (for example, browse forms and select boxes on forms), I've been able to specify the SQL statement CONCAT(cust_LastName,", ",cust_FirstName) and it's worked well. For example:
Screen Shot 2018-01-19 at 4.50.03 PM.png
However, I'm not finding a way to do this for a report field. I've tried making the report's underlying SQL include CONCAT AS Name, but that gets blown out when the SQL Builder closes. I've tried adding a field in the Fast Reports builder then changing the Field Name column to the desired SQL statement, but that causes PHP errors when I try to run the report and causes the report to not be editable (the window opened when the Report Designer button is clicked, is blank.)

Is there any way to do what I'm wanting to do?


Thank you!
Mike

Re: CONCATing a field for a report

Posted: Sat Jan 20, 2018 7:47 am
by admin
Mike,

I've tried to answer this question in your related post.

http://forums.nubuilder.cloud/viewtopic.p ... 544#p15544

Steven