Solved

SQL Reporting Services SSRS 2005 - Adding Parater with Default Value Causes Error

Posted on 2009-07-04
6
475 Views
Last Modified: 2012-05-07
I have a SQL Report that I would like to include drop down values for users to pick from.  I created a Parameter in the report.  If I don't try to make it a drop down, it works fine. I enter a value and the restricted report runs.  If I try to make it a drop down, I get the error shown in the screenshots.  I have included my parameter setup and errors in the screenshots.  My query code is below also.

P.S. - I get this error EVERY TIME I write a report so I am sure I am missing something, but I'm tired of the error and I'd love to get it right.  Thanks for your help!
select 'OPEN' as TABLEID, JRNENTRY, SOURCDOC, REFRENCE, TRXDATE, ORCTRNUM, ORMSTRID, ORDOCNUM, ORTRXSRC, CRDTAMNT, DEBITAMT from GL20000 

where ACTINDX = '41' AND SOURCDOC = @SourceDoc

UNION ALL

select 'HIST' as TABLEID, JRNENTRY, SOURCDOC, REFRENCE, TRXDATE, ORCTRNUM, ORMSTRID, ORDOCNUM, ORTRXSRC, CRDTAMNT, DEBITAMT from GL30000 

where ACTINDX = '41' AND SOURCDOC = @SourceDoc

order by SOURCDOC, JRNENTRY, TRXDATE

Open in new window

SSRS2005ParameterValue01.jpg
SSRS2005ParameterValue02.jpg
0
Comment
Question by:pmasseycpa
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:mfreuden
ID: 24777004
It looks like you need to remove the default value from this paramete.  Try blanking it out on the default parameter section.
0
 

Author Comment

by:pmasseycpa
ID: 24777028
I should have said, but I did try to change it to NULL on the parameter screen and that didn't help.  Is that what you meant?  If I have a value in EITHER place (available or default) I get the error.
0
 
LVL 17

Expert Comment

by:pssandhu
ID: 24777366
Under default values click non-queried and hand type the value. Your dataset ie returning multiple values and that is probably what is confusing the report server engine. By typing one value under the Non-Queried you are providing one value which the engine should be able to parse.
Hopefully that should fix it.
P.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:pmasseycpa
ID: 24778804
But I made the default value NULL and it didn't help.  Wouldn't that be the same or better than your suggestion pssandhu?  
0
 

Accepted Solution

by:
pmasseycpa earned 0 total points
ID: 24778837
Nevermind.  I had to create a second dataset to use for the parameter. I could not use the same dataset that my report was based on.  It confuses the report.  See here  http://msdn.microsoft.com/en-us/library/aa337234.aspx.
0
 
LVL 17

Expert Comment

by:pssandhu
ID: 24778845
Oh, that would explain it. Yes, you cannot use the same datasource to get parameters values as your main dataset for the report.
P.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now