Wednesday, March 28, 2012

Jump to report and parameters

I have a table where I want to jump to a different report based on the value
in the table cell. The report that I am jumping to has a parameter, and the
parameter value that I need to pass is based on the table cell's value. I
know how to set this up in the report but can't figure out how filter the
dataset that has my parameter values, and I can't filter the dataset using
ReportItems.
If I were to write some pseudocode using SQL it would look something like
this:
PopupReport(Select Param From ParamTable Where ParamKey = Fields!MyTextBox.Value)
Thanks...
Regards,
SteveIf the report you are jumping to has parameters then I am confused on the
issue. When setting up the jump to report you set the parameters of the
report you are jumping to, in this case to the field. That being the case,
what is the problem? The report you are jumping to must be able to accept
the parameter and return the correct data.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Steve" <MyNoSpam@.NoSpam.org> wrote in message
news:00B417ED-8954-4CAC-A07B-48FD361A3575@.microsoft.com...
>I have a table where I want to jump to a different report based on the
>value
> in the table cell. The report that I am jumping to has a parameter, and
> the
> parameter value that I need to pass is based on the table cell's value. I
> know how to set this up in the report but can't figure out how filter the
> dataset that has my parameter values, and I can't filter the dataset using
> ReportItems.
> If I were to write some pseudocode using SQL it would look something like
> this:
> PopupReport(Select Param From ParamTable Where ParamKey => Fields!MyTextBox.Value)
> Thanks...
> Regards,
> Steve|||Hi Bruce,
The problem I have is that the parameter value that I need to pass is in a
SQL table and I need to select the correct parameter based on the cell I am
clicking on.
For instance, the textbox value I am clicking on contains a sales region,
e.g. Central, Northeast, etc, and I want to pass a list of the salereps for
that region into another report. The list of salesreps for that region is
contained in a separate sql table and the sql to find the appropriate list of
salesreps would be something like "Select RepList From Configs Where Region ='Central'", except that the region varies with the row I am clicking on in
the Reporting Services table.
I can make this work if I do something like this for the parameter
expression in the report:
iif(Fields!Region.Value="Central","1,2,3",iif(Fields!Region.Value="Northeast","4,5,6",....))
, but it's kind of ugly and hardcoded...
Hope this is clearer and thanks for your response.
Regards,
Steve
"Bruce L-C [MVP]" wrote:
> If the report you are jumping to has parameters then I am confused on the
> issue. When setting up the jump to report you set the parameters of the
> report you are jumping to, in this case to the field. That being the case,
> what is the problem? The report you are jumping to must be able to accept
> the parameter and return the correct data.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Steve" <MyNoSpam@.NoSpam.org> wrote in message
> news:00B417ED-8954-4CAC-A07B-48FD361A3575@.microsoft.com...
> >I have a table where I want to jump to a different report based on the
> >value
> > in the table cell. The report that I am jumping to has a parameter, and
> > the
> > parameter value that I need to pass is based on the table cell's value. I
> > know how to set this up in the report but can't figure out how filter the
> > dataset that has my parameter values, and I can't filter the dataset using
> > ReportItems.
> >
> > If I were to write some pseudocode using SQL it would look something like
> > this:
> >
> > PopupReport(Select Param From ParamTable Where ParamKey => > Fields!MyTextBox.Value)
> >
> > Thanks...
> >
> > Regards,
> > Steve
>
>

No comments:

Post a Comment