Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7
This is the forum to discuss the Wrox book Professional SQL ServerReporting Services by Paul Turley, Todd Bryant, James Counihan, George McKee, Dave DuVarney; ISBN: 9780764568787
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 14th, 2005, 03:46 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default multivalue paramaters are not supported

has anyone come up with a backend fix to the fact that multivalue paramaters are not supported?

I need to be able to filter my dataregion with MULTIPLE VALUES otherwise the RS are useless...

FRUSTRATED USER!!

Reply With Quote
  #2 (permalink)  
Old February 17th, 2005, 02:13 PM
Authorized User
 
Join Date: Aug 2004
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to barmanvarn
Default

I'm not sure if this is what your asking, but I came up with a solution that I think works VERY well.

Example Query for region parameter:
select '-ALL-' as label, '%' as value
union
select region, region from table
order by 1

So, now your drop-down allows you to choose all, region1, region2, etc.

Next, in you main query do something like this:

select * from region table where region like @regionparameter.

This works perfectly for the report and for dependent parameters.

Hope this helps.
Reply With Quote
  #3 (permalink)  
Old February 20th, 2005, 01:30 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another solution that I used and works great:
Create a function in sql server:


CREATE function dbo.CSVTable(@Str varchar(7000))
returns @t table (numberval int, stringval varchar(100), DateVal datetime)
as
begin

declare @i int;
declare @c varchar(100);

set @Str = @Str + ','
set @i = 1;
set @c = '';

while @i <= len(@Str)
begin
if substring(@Str,@i,1) = ','
begin
insert into @t
values (CASE WHEN isnumeric(@c)=1 THEN @c else Null END,
rtrim(ltrim(@c)),
CASE WHEN isdate(@c)=1 then @c else Null END)
set @c = ''
end
else
set @c = @c + substring(@Str,@i,1)
set @i = @i +1
end
return
end

Then in the sp use that function as follows:

where
(@Paramregion IS NULL OR t.region in (Select stringval from dbo.CSVTABLE (@Paramregion)))





Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Element 'register' is not supported sstuber BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 January 21st, 2010 10:23 AM
Multivalue controls GS C# 2005 1 May 16th, 2007 06:56 AM
Multivalue parameter Reporting Services 2005 aldwinenriquez Reporting Services 2 January 11th, 2007 02:41 PM
Automatically add querystring paramaters to URL trancehead ASP.NET 2.0 Professional 0 July 24th, 2006 03:03 AM
recordcount attribute supported alyeng2000 SQL Server 2000 0 November 17th, 2003 11:02 PM



All times are GMT -4. The time now is 04:32 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.