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

 Tabs In Listboxes (MS-SQL)

Print topic Send  topic

Author Message
innonet

Posts: 55
Posted: 12/10/2010, 1:47 PM

I have a listbox which retrieves the values from several tables. And instead of having one long line, I would like to display them in tabs, e.g.

John Stewart Employee New York
Paula Miller Employee Miami
Peter Stauer Employee Atlanta

Right now it is displayed as follows when I click on the listbox:
John Stewart Employee New York

I know there is a Microsoft SQL Command which I add to the SELECT. But due to a brainfart I am not able to remember it.

We are using ASP.net C# Inmotion and MSSQL 2008. If there is another way to go please send me your suggestions !

PLEASE, any help is super appreciated.
View profile  Send private message
datadoit
Posted: 12/10/2010, 2:29 PM

Probably something like SELECT
CONCAT(field1,Nchar(9),field1,Nchar(9),field3) AS Text
innonet

Posts: 55
Posted: 12/13/2010, 7:05 AM

Hi there,
thank you for your reply. But Microsoft SQL Server does not know a CONCAT command !

Please, any help or input is appreciated.
View profile  Send private message
datadoit
Posted: 12/13/2010, 11:01 AM

My bruthah! http://www.google.com/#q=sql+server+concatenate
innonet

Posts: 55
Posted: 12/13/2010, 12:22 PM

Hi Datadoit,

the problem is NOT to retrieve the values but to display them in a tabbed view within the list box, e.g.

Paul ........... Miller ..........Chicago
John ...........Harper .......Miami
Sandra .......Kozlak .......Atlanta

Right now I get which is hard to read if you have 20+ listings.
Paul Miller, Chicago
John Harper, Miami
Sandra Kozlak, Atlanta

PS: The dots above represent the space (the textbox here removes empty space)

Any new input ????????????
View profile  Send private message
datadoit
Posted: 12/13/2010, 1:31 PM

Did you try: SELECT field1 + Nchar(9) + field2 + Nchar(9) + field3

that should put tabs between each field.

Ref:
http://www.simple-talk.com/sql/t-sql-programming/concat...n-transact-sql/
innonet

Posts: 55
Posted: 12/13/2010, 2:01 PM

Yes, I have tried that. I don't get any error but it displays everything in a single long row.

View profile  Send private message
ReneS

Posts: 225
Posted: 12/14/2010, 11:42 AM

Hi,

In the datasource of the listbox, custum sql, something like SELECT "field1" + " "' + "field2" + "' " + "field3"
or: something like SELECT "field1" + "\t"' + "field2" + "'\t" + "field3" (\t with or without quotes...)
or: something like SELECT "field1" + (char)9 + "field2" + (char)9 + "field3"

Hope there is something...

Rene
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 12/17/2010, 10:34 AM

Hi,

Realise than on the php code page, there´s the code related to the components than you have

on the html view, realise than this code owns every form and inside every form exists differents

functions, so check out this php code pages, find where the object is declared and than you

can modify the SQL Statemente there (Realise than if you modify some function from php code

page,it´ll stop working the autogeneration code).
_________________
Best Regards
Entrepeneur | NT Consultant
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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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