I have a report with an imbedded SubReport. I have set up the
subreport control to pass a parameter from the parent report to the
subreport. However, I'm stuck trying to actually use that parameter
within the subreport. This parameter will be used within a SQL
statement in the dataset tab.
I've tried setting a report parameter within the subreport and a
parameter within the dataset. I'm at a loss. Seems pretty simple, but
I'm obviously overlooking something. Any thoughts would be welcome.
ThanksSubreports are nothing special. They are a report that you have embedded.
You should design the report that will be used as a subreport first as a
report with report parameters. Test that report separately. Then after
embedding the report you do a right mouse click, parameters on the subreport
and map what the parameters should be.
Now, if you don't know how to use query parameters/report parameters that is
another matter and not really a subreport issue.
If you have a query that is like this:
select * from sometable where somefield = @.MyParam
Then RS automatically creates a report parameter called MyParam (note that
parameters are case sensitive).
When dealing with parameters you might be best to switch from graphical
designer mode to generic mode (the button is to the right of the ...).
Now, after embedding the report as a subreport you will map the MyParam
parameter to something in your main report. Either a field or a report
parameter.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<dbutler_05@.hotmail.com> wrote in message
news:1166472829.204286.113100@.79g2000cws.googlegroups.com...
>I have a report with an imbedded SubReport. I have set up the
> subreport control to pass a parameter from the parent report to the
> subreport. However, I'm stuck trying to actually use that parameter
> within the subreport. This parameter will be used within a SQL
> statement in the dataset tab.
> I've tried setting a report parameter within the subreport and a
> parameter within the dataset. I'm at a loss. Seems pretty simple, but
> I'm obviously overlooking something. Any thoughts would be welcome.
> Thanks
>|||I figured it was something stupid simple. Just trying to make it hard
than it is.
Thanks for the help.
Bruce L-C [MVP] wrote:
> Subreports are nothing special. They are a report that you have embedded.
> You should design the report that will be used as a subreport first as a
> report with report parameters. Test that report separately. Then after
> embedding the report you do a right mouse click, parameters on the subreport
> and map what the parameters should be.
> Now, if you don't know how to use query parameters/report parameters that is
> another matter and not really a subreport issue.
> If you have a query that is like this:
> select * from sometable where somefield = @.MyParam
> Then RS automatically creates a report parameter called MyParam (note that
> parameters are case sensitive).
> When dealing with parameters you might be best to switch from graphical
> designer mode to generic mode (the button is to the right of the ...).
> Now, after embedding the report as a subreport you will map the MyParam
> parameter to something in your main report. Either a field or a report
> parameter.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> <dbutler_05@.hotmail.com> wrote in message
> news:1166472829.204286.113100@.79g2000cws.googlegroups.com...
> >I have a report with an imbedded SubReport. I have set up the
> > subreport control to pass a parameter from the parent report to the
> > subreport. However, I'm stuck trying to actually use that parameter
> > within the subreport. This parameter will be used within a SQL
> > statement in the dataset tab.
> >
> > I've tried setting a report parameter within the subreport and a
> > parameter within the dataset. I'm at a loss. Seems pretty simple, but
> > I'm obviously overlooking something. Any thoughts would be welcome.
> >
> > Thanks
> >
No comments:
Post a Comment