Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Parameter Error when previewing (New to SRS)

Author  Topic 

MikeDevenney
Starting Member

20 Posts

Posted - 2008-03-10 : 10:59:50
I am new to SRS and have yet to preview a report successfully. Here's my situation. I have a fairly complex set of logic that will generate the data that I use as the dataset for the report, this is housed in a stored proc that takes three parameters (2 DateTime and one varchar). The last few steps select the data into a temp table which I then issue a Select * on to get the data back for the report. This all works fine if I run it from the Data tab using the ! button, but when I try to preview I get an error saying the following:

An error occurred during local report processing.
An error has occurred during report processing.
Query execution failed for data set 'dsMarketPrices'.
Procedure or function 'spr_Recon_SelectMarketPrices' expects parameter '@DateStart', which was not supplied.

Do I have to manually add the parameters to the report? I assumed not since it knows to prompt me for them when I run the data using the ! button...

Mike Devenney

MikeDevenney
Starting Member

20 Posts

Posted - 2008-03-10 : 11:25:34
EDIT: I added parameters to the report (Right click in Layout tab and chose Report Parameters). I gave them the same name as the parameters in the SP but I still get the same error when trying to preview the report.

Mike Devenney
Go to Top of Page

tprupsis
Yak Posting Veteran

88 Posts

Posted - 2008-03-10 : 11:41:36
Did you give the parameters default values? SSRS runs the report as soon as you click preview, so it may be that it can't run if default values for the report aren't provided.
Go to Top of Page

MikeDevenney
Starting Member

20 Posts

Posted - 2008-03-10 : 11:44:57
I didn't give them defaults originally, but I just tried it with them and I still get the same error. I tried changing the name of the parameter to @DateEnd but the designer doesn't like the @ symbol.

Mike Devenney
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-03-10 : 12:07:25
Did you hit referesh button to get the fields & parameter info in data tab after you ran the sp there?
Go to Top of Page

MikeDevenney
Starting Member

20 Posts

Posted - 2008-03-10 : 12:25:29
quote:
Originally posted by visakh16

Did you hit referesh button to get the fields & parameter info in data tab after you ran the sp there?



NICE...

Missed the refresh button before. It runs fine now. THANKS!

Mike Devenney
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-03-10 : 12:27:59
quote:
Originally posted by MikeDevenney

quote:
Originally posted by visakh16

Did you hit referesh button to get the fields & parameter info in data tab after you ran the sp there?



NICE...

Missed the refresh button before. It runs fine now. THANKS!

Mike Devenney


Thats cool.I had done the same mistake once. Was ceratianly thinking tht might be the case when i read through.
Go to Top of Page

MikeDevenney
Starting Member

20 Posts

Posted - 2008-03-10 : 12:41:27
hmmm, sometimes getting your data into the report isn't a good thing.

I just got the report to work, dropped the fields onto the layout surface and previewed it. Everything looks good, except there's only one record showing. If I change the parameters the data returned changes but there is still only one record showing...

Mike Devenney
Go to Top of Page

MikeDevenney
Starting Member

20 Posts

Posted - 2008-03-10 : 14:02:11
Co-worked got me on the right track with this one. Didn't realize that you needed to drop your textboxes into a table control when showing multiple records at once.

Mike Devenney
Go to Top of Page
   

- Advertisement -