February 23, 2012 at 1:40 pm
I have a report that is going to be the body of a long email that contains statistics from our database (think form letter format). Each section of the report will have a different dataset. So, instead of creating a stored procedure for each section, I just created one stored proc that accepts a parameter telling it which part of the proc to run. My problem is that I can't figure out how to pass a default parameter to the stored proc in the SSRS dataset.
If I try to pass it as part of the query string like I would in Management Studio, it gives me an error.
I tried to set it in the Dataset dialog box (see pictures), but it still asks me every time I run it.
February 26, 2012 at 1:18 am
confused.
February 26, 2012 at 3:27 pm
Add the default to the parameter in the stored procedure itself.
CREATE PROCEDURE dbo.SomeProc
Parameter1 INT, --This has no default
Parameter2 VARCHAR(8000) = 'SomeValue' --This has a default of 'SomeValue'
AS
procbodyhere...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply