Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / February 2007

Tip: Looking for answers? Try searching our database.

Report Parameters - multiple value labels

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
schmidtkaren - 27 Feb 2007 06:24 GMT
I have created a query for a parameter ie:
select id. name, type
 from tablea
I would like to show both name & type in the value (drop down list for
user).   How can I do that?
Signature

Karen
Systems Analyst

Amarnath - 27 Feb 2007 09:36 GMT
make sure you are using the same data type for name & type ie string
otherwise convert it to string.. you can give something like this
select id.name + ' ' + type as toshow from tablea a
and select the toshow from the report parameter "from query" and see to that
the parameter you are going to use, if it is just name or type,  use "mid
func" to extract the string you want to use for the result set in the query.

Amarnath

> I have created a query for a parameter ie:
> select id. name, type
>   from tablea
> I would like to show both name & type in the value (drop down list for
> user).   How can I do that?
schmidtkaren - 27 Feb 2007 20:43 GMT
Thanks for your response.  Sorry, I should have been more descriptive.  I did
try stringing the fields together, but the name and type fields vary in
length so I get a very scattered looking drop down.  Ie. where the name =
Audit of Energy and Type=Attest, in the list I get:

Audit of Energy Attest
Perform Measures Systems

However, I would like see the Names alligned and the Types alligned:
Name                      Type
Audit of Energy         Attest
Perform Measures    Systems
Signature

Systems Analyst
Office of the Auditor General of Alberta

> make sure you are using the same data type for name & type ie string
> otherwise convert it to string.. you can give something like this
[quoted text clipped - 10 lines]
> > I would like to show both name & type in the value (drop down list for
> > user).   How can I do that?
David Bienstock - 27 Feb 2007 23:39 GMT
try

select right('             '+id.name,30) + ' ' + right('              ' +
type,30)
from tablea

you can change the amount of spaces and the max length (e.g. 30)
Signature

"Everyone knows something you don't know"

> Thanks for your response.  Sorry, I should have been more descriptive.  I did
> try stringing the fields together, but the name and type fields vary in
[quoted text clipped - 23 lines]
> > > I would like to show both name & type in the value (drop down list for
> > > user).   How can I do that?
Amarnath - 28 Feb 2007 08:55 GMT
Yes you can refer the other post, basically you can pad with space and display.

Amarnath

> Thanks for your response.  Sorry, I should have been more descriptive.  I did
> try stringing the fields together, but the name and type fields vary in
[quoted text clipped - 23 lines]
> > > I would like to show both name & type in the value (drop down list for
> > > user).   How can I do that?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.