CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Join fields in Listbox....

Print topic Send  topic

Author Message
shiller


Posts: 20
Posted: 03/04/2008, 8:50 AM

Experts,

Is there a way to concatenate two fields in a listbox in CodeCharge.... for example FirstName and LastName.

Thanks
View profile  Send private message
ckroon

Posts: 869
Posted: 03/04/2008, 9:31 AM

I just figured this out the other day.
The method I sued was in Mysql.. so hopefully this applies to your situation.

Use this code in the data source of the listbox

SELECT forecast.forecast_id, concat_ws('-',forecast.forecast_date, period_defs.month_text) AS display WHERE forecast.initial_period = period_defs.period_id order by 2

Keep the following pieces intact:

concat_ws('-',

AS display WHERE

order by 2

Change the rest to suit your tables. The '-' is what separates the two fields in the display.
Enjoy!

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
shiller


Posts: 20
Posted: 04/01/2008, 10:58 AM

In the Listbox's "Text column" put: Expr1

In the Listbox's "Data Source Type" put: SQL

In the Listbox's "DataSource" put:

SELECT user_id, FirstName + ' ' + LastName AS Expr1
FROM users

the good folks at tech support suggest that methods and it works like a charm... :-)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.