From: jazzydance on
I want to add report parameters to a sql server report service 2008 that has
been generated by the report wizard and have the parameters work.
I can get the report parametes to look like they work by doing the following:
1. select view then report data then right click parameters in the report
data window.
2. I then select add parameters then enter a 'name' then enter a prompt
name and then select data type.
3. I then right click on the dataset and then click dataset properties and
then click on parameteres in the dataset properties window and add

the parameters I want.

The above looks ok, but the parameters do not work.

What do I need to do get the report parameters to work either after a new
report has been setup using the report wizard and/or adding the

report parameters to work at a later time.
From: Scho on
Try adding the parameters into the underlying SQL code using the
format @ParameterName and it should work.

e.g.

Select FieldA, FieldB FROM Table WHERE Field A = @Parameter1

HTH,
Scho
From: jazzydance on
"Scho":

I am using a stored procedure when trying to run the reports. Thus I can
not use the underlying sql. Thus is there another solution? if not, by using
the visual studio.net 2008 environment, can you tell where the 'underlying
SQL code is at?
Can I still use 'underlying sql' and still call my stored procedure? If
so, how would you accomplish this task?

Thanks!

"Scho" wrote:

> Try adding the parameters into the underlying SQL code using the
> format @ParameterName and it should work.
>
> e.g.
>
> Select FieldA, FieldB FROM Table WHERE Field A = @Parameter1
>
> HTH,
> Scho
> .
>
From: Bruce L-C [MVP] on
Now here is your problem. RS should be identifying the stored procedure
parameters and automatically creating matching Reporting Services parameters
and mapping them. Are you using a SQL Server stored procedure?

How is your sql written. I think all you need to do is change the query type
to stored procedure and put in the sp name. You might end up with extra
parameters if you already have some because it will call your RS parameter
the same as your SQL Server sp parameter.

--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

"jazzydance" <jazzydance(a)discussions.microsoft.com> wrote in message
news:4EBAB066-C29A-420F-93FB-EAF2C932D37F(a)microsoft.com...
> "Scho":
>
> I am using a stored procedure when trying to run the reports. Thus I can
> not use the underlying sql. Thus is there another solution? if not, by
> using
> the visual studio.net 2008 environment, can you tell where the 'underlying
> SQL code is at?
> Can I still use 'underlying sql' and still call my stored procedure? If
> so, how would you accomplish this task?
>
> Thanks!
>
> "Scho" wrote:
>
>> Try adding the parameters into the underlying SQL code using the
>> format @ParameterName and it should work.
>>
>> e.g.
>>
>> Select FieldA, FieldB FROM Table WHERE Field A = @Parameter1
>>
>> HTH,
>> Scho
>> .
>>
From: jazzydance on
I changed the query type to stored procedure and entered the stored procedure
name.

Thanks!

"Bruce L-C [MVP]" wrote:

> Now here is your problem. RS should be identifying the stored procedure
> parameters and automatically creating matching Reporting Services parameters
> and mapping them. Are you using a SQL Server stored procedure?
>
> How is your sql written. I think all you need to do is change the query type
> to stored procedure and put in the sp name. You might end up with extra
> parameters if you already have some because it will call your RS parameter
> the same as your SQL Server sp parameter.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "jazzydance" <jazzydance(a)discussions.microsoft.com> wrote in message
> news:4EBAB066-C29A-420F-93FB-EAF2C932D37F(a)microsoft.com...
> > "Scho":
> >
> > I am using a stored procedure when trying to run the reports. Thus I can
> > not use the underlying sql. Thus is there another solution? if not, by
> > using
> > the visual studio.net 2008 environment, can you tell where the 'underlying
> > SQL code is at?
> > Can I still use 'underlying sql' and still call my stored procedure? If
> > so, how would you accomplish this task?
> >
> > Thanks!
> >
> > "Scho" wrote:
> >
> >> Try adding the parameters into the underlying SQL code using the
> >> format @ParameterName and it should work.
> >>
> >> e.g.
> >>
> >> Select FieldA, FieldB FROM Table WHERE Field A = @Parameter1
> >>
> >> HTH,
> >> Scho
> >> .
> >>
> .
>