Hi there,
Is it possible to have a single report parameter actually be used to update
several query parameters used by a stored procedure in my report. The stored
procedure I'm using requires 7 parameters ... but I can determine what the
values should be for the last six based on the value the user assigns to the
first one. Therefore, instead of forcing the user to assign all 7 ... I
wanted to be able to set the remaining six based on what they assign to the
first.
Is this possible? And if so, how?
Thanks - GGreg,
I haven't tried doing this with stored procedure queries, so I'll let
someone else respond how that works. I can tell you that you definitely can
do a text query and then reference your report parameter as necessary.
Worst case, if the query parameters can all be determined from one input,
you could create a wrapper SP with only 1 parameter and put the logic inside
this SP to call the existing SP with the 7 calculated values.
Have you gotten an error message trying to set all 7 SP parameters? I would
have expected this to be something pretty easy to do from the parameters
dialog.
Ted
"Greg" wrote:
> Hi there,
> Is it possible to have a single report parameter actually be used to update
> several query parameters used by a stored procedure in my report. The stored
> procedure I'm using requires 7 parameters ... but I can determine what the
> values should be for the last six based on the value the user assigns to the
> first one. Therefore, instead of forcing the user to assign all 7 ... I
> wanted to be able to set the remaining six based on what they assign to the
> first.
> Is this possible? And if so, how?
> Thanks - G|||True, another way even more straight forward. I do this all the time with
dates. Create 7 query parameters. RS automatically creates 7 report
parameters. Go to parameters tab (click on ..., parameters tab). For
parameter 2-7 you map to an expression that references the first parameter
and does whatever you want to it. If need be use code behind report to
really manipulate it. Then go into the Report->Parameters menu from layout
and delete the unneeded Report Parameters.This way is really cleaner than my
first suggestion.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ted K" <tedk@.nospam.nospam> wrote in message
news:FDADCBCC-8FAA-4004-A6F8-D3C1276C49AB@.microsoft.com...
> Greg,
> I haven't tried doing this with stored procedure queries, so I'll let
> someone else respond how that works. I can tell you that you definitely
> can
> do a text query and then reference your report parameter as necessary.
> Worst case, if the query parameters can all be determined from one input,
> you could create a wrapper SP with only 1 parameter and put the logic
> inside
> this SP to call the existing SP with the 7 calculated values.
> Have you gotten an error message trying to set all 7 SP parameters? I
> would
> have expected this to be something pretty easy to do from the parameters
> dialog.
> Ted
> "Greg" wrote:
>> Hi there,
>> Is it possible to have a single report parameter actually be used to
>> update
>> several query parameters used by a stored procedure in my report. The
>> stored
>> procedure I'm using requires 7 parameters ... but I can determine what
>> the
>> values should be for the last six based on the value the user assigns to
>> the
>> first one. Therefore, instead of forcing the user to assign all 7 ... I
>> wanted to be able to set the remaining six based on what they assign to
>> the
>> first.
>> Is this possible? And if so, how?
>> Thanks - G
No comments:
Post a Comment