home
training courses
why choose us?
solutions
support
company
LearnItFirst User Forum
Welcome Guest
Search
|
New Posts
|
Members
|
Log In
|
Register
SQL Server Forum - LearnItFirst.com
»
SQL Server Scripts, Code Samples and SSMS Custom Reports
»
SQL Server Management Studio Custom Reports
»
Parameter report
Parameter report
Options
Previous Topic
·
Next Topic
anaylor01
Posted:
Thursday, December 27, 2007 10:04:25 AM
Rank: Newbie
Joined: 12/24/2007
Posts: 3
Points: 9
Where do you live?: NYC
Problem #1. In Reports if you add a parameter and select multi-value when I run the report and Select All from the drop down list or if I select more than one value I get "incorrect syntax near ','. I haven't been able to find anything on this error. I am running Sql Server 2005 SP2.
Problem #2. In Microsoft Access I can add a Combobox that will return a list of values from a table and will let me assign a sort order.
When the form is loaded there is no value for combobox. The user can leave this value blank. What I like to do is write code that says if the combobox is null then select all.
When I try to do this in VB.net the form loads the combobox with values already in the combobox.
How can I either fix problem #1 or #2 or both? Thanks for your help.
Happy holidays.
Back to top
Scott Whigham
Posted:
Monday, January 21, 2008 1:29:36 PM
Rank: Super Mod
Joined: 3/20/2006
Posts: 460
Points: 1,002
Where do you live?: Dallas, TX
Hi there -
Just saw these - sorry for not responding sooner
#1 - I just actually recorded a series on this same topic
You need to change your WHERE clause from using "=" to using IN (). Example: WHERE OrderId=@OrderId works for single-value but, for multi-value, you just change it to WHERE OrderId IN (@OrderId).
#2 - No idea.
Back to top
Users browsing this topic
Guest
Forum Jump
SQL Server Database Administration
- General SQL Database Question & Answer
- Backup, Recovery and Disaster Recovery
- SQL Server Security
- Integration Services (SSIS) and DTS
Transact-SQL Programming
- DML (SELECT, INSERT, UPDATE, DELETE) Questions
- Stored Procedures, Triggers, & Functions
SQL Server Scripts, Code Samples and SSMS Custom Reports
- All SQL Server Versions
- SQL Server 2005/2008
- SQL Server Management Studio Custom Reports
Customer Service
- Video Requests
You
cannot
post new topics in this forum.
You
cannot
reply to topics in this forum.
You
cannot
delete your posts in this forum.
You
cannot
edit your posts in this forum.
You
cannot
create polls in this forum.
You
cannot
vote in polls in this forum.
SQL Server 2005 DBA Training Videos
SQL Server 2008 DBA Training Videos
Watch this topic
RSS Feed
Email this topic
Print this topic
Threaded
Normal