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 January 30th, 2007, 11:44 AM
Registered User
 
Join Date: May 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JimReid
Default Problem with Multi-select for report parameter

I have a simple question. In SQL you can select.....where X in (a, b, c). With multiple parameters this is fine if you are selection exactly from your drop down what goes in the where in clause. In my case I have done this in selecting multiple record numbers and it works fine. When I set up the parameter to display one literal but then select with another I start having problems. For Example: I want to display "Divison Name" but actually select data by the Divison Number from the database. The Value Field is the DivisonNumber but the Label Field is the DivisionName. Since it is a multi-selection the DivsionName is displayed and I can check multiple DivisionNames but then the SQL gives me an error that says:
"Query Execution Failed for data set 'ReportRequestProd' line 21: Incorrect syntax near ','". It also displays the "DivisionName, DivisionName" in the drop down (not the DivisionNumber). Since I can't actually see the query I'm assuming that it is putting DivisionName in the query instead of the DivisionNumbers.

The WHERE clause has "DivisionID in (@DivisionParm)" which should resolve to "DivisonID in (10, 20)"

Anyone have any idea what I'm doing wrong? The report parameters for DivisionParm are
DataType: String
Prompt: Division
Multi-value - checked
Available values: From query-checked
Dataset: Divison
Value field: UniqueID (this is divisionnumber)
Labelfield: DivisionName

The division dataset is simple query for the divisonnumber (uniqueID) and divisionname:

Select * from tbl_Division

:D

Any help would be appreciated. I can't put it into production with this error still existing. BTW it works when I just display the DivisionNumbers to select from but the users would not know numbers.

Thanks,

Jim Reid
[email protected]






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to passing multi parameter diablo Crystal Reports 0 May 26th, 2008 06:13 AM
Multi-use of UDF in SELECT statement monnyann SQL Server 2005 7 October 3rd, 2007 06:01 AM
Crystal Report Parameter Problem donsls Crystal Reports 4 October 10th, 2006 09:22 AM
Multi-Select Parameters jparkgb BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 August 14th, 2006 06:02 AM
Multi Select Combo Box acdsky VB How-To 2 March 1st, 2004 03:09 PM





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