Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2005, 10:59 AM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pass Multiple Parameters from C# to SQL RS

I have been working on a solution for a while to get around the current limitations in SQL RS as it relates to passing multiple parameters to a report. I have created a stored procedure to handle the multiple parameters. I have developed a User interface in C# so the user can select multiple values from listboxes and I want to pass those values selected to the report. I have it working fine as long as the user selects one value, but once the user selects more than one value, the system does not recognize the values passed.

If I run the query in SQL RS development mode and pass in, let's say 1;2;3;4;, the report executes fine. If I set returnValues[i].Value = "1;2;3;4";, the report does not run. If I set returnValues[i].Value = "1", the report runs fine.

How do I pass multiple values in C#?

Any help would be greatly appreciated.
 
Old July 25th, 2005, 02:05 PM
Registered User
 
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you have code in your report to parse the values from your concatenated list of parameters?

Another approach might be to specify one value per distinct parameter rather than specifying multiple values for a single parameter.
 
Old July 25th, 2005, 06:34 PM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I pass one value, it definitely works, but most of my reports will require multiple values passed. No, I do not have a procedure to parse the values. If necessary, I can easily create one. I was just hardcoding the values to see if it would work, and it does not.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Solved - rs.FindFirst and Multiple Column ComboBox eusanpe Access VBA 1 May 20th, 2008 03:21 PM
Solved-RS.FindFirst and Multiple Column ComboBox eusanpe Access VBA 0 May 19th, 2008 01:25 PM
to pass parameters rashmid HTML Code Clinic 1 May 30th, 2005 11:10 PM
SQL Pass though parameters to stored procedures blinton25 SQL Server 2000 3 March 29th, 2004 02:49 PM
How to pass multiple parameters to CR 9 syedjavid Crystal Reports 1 September 17th, 2003 05:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.