Showing posts with label multi-value. Show all posts
Showing posts with label multi-value. Show all posts

Wednesday, March 28, 2012

Passing Multi-Value parameters to a Data Driven Subscription

Hi,

I've been asked to set up a data driven subscription for a number of reports which use multi value parameters. For example, show me all transactions against the following departments: IT, Building Services, Accounts.

As an interactive report it's simple, the user just selects the relevant departments, but as a data driven subscription I can't seem to find the correct format to pass the selections through.

Has anyone tried this before?

Thanks,

Dan

please search on "Multi-Value parameters to a Data Driven Subscription" in this forum.

passing multi-value parameter to subreport

ok - i've googled this and have tried everything to no avail...
parent report has multi-value parameter: part_code
this gets passed to subreport which has part_code setup as multi-
valued paramter
what is the syntax in the parent...subreport properties/parameters box
and
what is the syntax in the child report parameters form?
thanks very muchon the subreport properties->parameters give
"=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
passed to the subreport as well.
Amarnath, MCTS
"roy@.mgk.com" wrote:
> ok - i've googled this and have tried everything to no avail...
> parent report has multi-value parameter: part_code
> this gets passed to subreport which has part_code setup as multi-
> valued paramter
> what is the syntax in the parent...subreport properties/parameters box
> and
> what is the syntax in the child report parameters form?
>
> thanks very much
>|||On Mar 21, 9:10 am, Amarnath <Amarn...@.discussions.microsoft.com>
wrote:
> on the subreport properties->parameters give
> "=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
> passed to the subreport as well.
> Amarnath, MCTS
>
> "r...@.mgk.com" wrote:
> > ok - i've googled this and have tried everything to no avail...
> > parent report has multi-value parameter: part_code
> > this gets passed to subreport which has part_code setup as multi-
> > valued paramter
> > what is the syntax in the parent...subreport properties/parameters box
> > and
> > what is the syntax in the child report parameters form?
> > thanks very much- Hide quoted text -
> - Show quoted text -
did that Amarnath ))...and i have in the parent the subreport
properties/parameters: "=Parameters!PART_CODE"
all i get is 'error - subreport could not be shown'......|||On Mar 22, 8:07 am, r...@.mgk.com wrote:
> On Mar 21, 9:10 am, Amarnath <Amarn...@.discussions.microsoft.com>
> wrote:
>
>
> > on the subreport properties->parameters give
> > "=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
> > passed to the subreport as well.
> > Amarnath, MCTS
> > "r...@.mgk.com" wrote:
> > > ok - i've googled this and have tried everything to no avail...
> > > parent report has multi-value parameter: part_code
> > > this gets passed to subreport which has part_code setup as multi-
> > > valued paramter
> > > what is the syntax in the parent...subreport properties/parameters box
> > > and
> > > what is the syntax in the child report parameters form?
> > > thanks very much- Hide quoted text -
> > - Show quoted text -
> did that Amarnath ))...and i have in the parent the subreport
> properties/parameters: "=Parameters!PART_CODE"
> all i get is 'error - subreport could not be shown'......- Hide quoted text -
> - Show quoted text -
i should've said i implemented that...as well as the "=Parameters!
PART_CODE" in my previous reply...
is there some change in the SQL?...i'm just using the "....part_code
in (@.PART_CODE)" with the paramter setup normailly in the subreport's
report parameter properties......|||To be very clear, The problem is due to parameters only. First go to the
report which you include as "Subreport" in the main report. open the report
properties, check for multi-value.
close that remaining same. (ie string, non queried or queried, default null.)
Go to the main report where you have placed subreport. on the subreport
right click for properties and the parameter, this is the main culprit for
not working.
Parameter Name: select from the drop down.
Parameter Value: "=Parameters!cn.Value" here just include value instead of
Value(0)
This should work. Let me know if it works.
Amarnath, MCTS.
"roy@.mgk.com" wrote:
> On Mar 22, 8:07 am, r...@.mgk.com wrote:
> > On Mar 21, 9:10 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > wrote:
> >
> >
> >
> >
> >
> > > on the subreport properties->parameters give
> > > "=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
> > > passed to the subreport as well.
> >
> > > Amarnath, MCTS
> >
> > > "r...@.mgk.com" wrote:
> > > > ok - i've googled this and have tried everything to no avail...
> >
> > > > parent report has multi-value parameter: part_code
> >
> > > > this gets passed to subreport which has part_code setup as multi-
> > > > valued paramter
> >
> > > > what is the syntax in the parent...subreport properties/parameters box
> >
> > > > and
> >
> > > > what is the syntax in the child report parameters form?
> >
> > > > thanks very much- Hide quoted text -
> >
> > > - Show quoted text -
> >
> > did that Amarnath ))...and i have in the parent the subreport
> > properties/parameters: "=Parameters!PART_CODE"
> >
> > all i get is 'error - subreport could not be shown'......- Hide quoted text -
> >
> > - Show quoted text -
> i should've said i implemented that...as well as the "=Parameters!
> PART_CODE" in my previous reply...
> is there some change in the SQL?...i'm just using the "....part_code
> in (@.PART_CODE)" with the paramter setup normailly in the subreport's
> report parameter properties......
>|||On Mar 23, 1:21 am, Amarnath <Amarn...@.discussions.microsoft.com>
wrote:
> To be very clear, The problem is due to parameters only. First go to the
> report which you include as "Subreport" in the main report. open the report
> properties, check for multi-value.
> close that remaining same. (ie string, non queried or queried, default null.)
> Go to the main report where you have placed subreport. on the subreport
> right click for properties and the parameter, this is the main culprit for
> not working.
> Parameter Name: select from the drop down.
> Parameter Value: "=Parameters!cn.Value" here just include value instead of
> Value(0)
> This should work. Let me know if it works.
> Amarnath, MCTS.
>
> "r...@.mgk.com" wrote:
> > On Mar 22, 8:07 am, r...@.mgk.com wrote:
> > > On Mar 21, 9:10 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > > wrote:
> > > > on the subreport properties->parameters give
> > > > "=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
> > > > passed to the subreport as well.
> > > > Amarnath, MCTS
> > > > "r...@.mgk.com" wrote:
> > > > > ok - i've googled this and have tried everything to no avail...
> > > > > parent report has multi-value parameter: part_code
> > > > > this gets passed to subreport which has part_code setup as multi-
> > > > > valued paramter
> > > > > what is the syntax in the parent...subreport properties/parameters box
> > > > > and
> > > > > what is the syntax in the child report parameters form?
> > > > > thanks very much- Hide quoted text -
> > > > - Show quoted text -
> > > did that Amarnath ))...and i have in the parent the subreport
> > > properties/parameters: "=Parameters!PART_CODE"
> > > all i get is 'error - subreport could not be shown'......- Hide quoted text -
> > > - Show quoted text -
> > i should've said i implemented that...as well as the "=Parameters!
> > PART_CODE" in my previous reply...
> > is there some change in the SQL?...i'm just using the "....part_code
> > in (@.PART_CODE)" with the paramter setup normailly in the subreport's
> > report parameter properties......- Hide quoted text -
> - Show quoted text -
((
tried but not working...have logged incident with microsoft on this..|||On Mar 27, 12:53 pm, r...@.mgk.com wrote:
> On Mar 23, 1:21 am, Amarnath <Amarn...@.discussions.microsoft.com>
> wrote:
>
>
> > To be very clear, The problem is due to parameters only. First go to the
> > report which you include as "Subreport" in the main report. open the report
> > properties, check for multi-value.
> > close that remaining same. (ie string, non queried or queried, default null.)
> > Go to the main report where you have placed subreport. on the subreport
> > right click for properties and the parameter, this is the main culprit for
> > not working.
> > Parameter Name: select from the drop down.
> > Parameter Value: "=Parameters!cn.Value" here just include value instead of
> > Value(0)
> > This should work. Let me know if it works.
> > Amarnath, MCTS.
> > "r...@.mgk.com" wrote:
> > > On Mar 22, 8:07 am, r...@.mgk.com wrote:
> > > > On Mar 21, 9:10 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > > > wrote:
> > > > > on the subreport properties->parameters give
> > > > > "=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
> > > > > passed to the subreport as well.
> > > > > Amarnath, MCTS
> > > > > "r...@.mgk.com" wrote:
> > > > > > ok - i've googled this and have tried everything to no avail...
> > > > > > parent report has multi-value parameter: part_code
> > > > > > this gets passed to subreport which has part_code setup as multi-
> > > > > > valued paramter
> > > > > > what is the syntax in the parent...subreport properties/parameters box
> > > > > > and
> > > > > > what is the syntax in the child report parameters form?
> > > > > > thanks very much- Hide quoted text -
> > > > > - Show quoted text -
> > > > did that Amarnath ))...and i have in the parent the subreport
> > > > properties/parameters: "=Parameters!PART_CODE"
> > > > all i get is 'error - subreport could not be shown'......- Hide quoted text -
> > > > - Show quoted text -
> > > i should've said i implemented that...as well as the "=Parameters!
> > > PART_CODE" in my previous reply...
> > > is there some change in the SQL?...i'm just using the "....part_code
> > > in (@.PART_CODE)" with the paramter setup normailly in the subreport's
> > > report parameter properties......- Hide quoted text -
> > - Show quoted text -
> ((
> tried but not working...have logged incident with microsoft on this..- Hide quoted text -
> - Show quoted text -
i've spoken to microsoft tech support - and they could not get it to
work...i'm assuming at this point we cannot reference a multi-value
paramenter in a subreport that rerferences it in the SQL statement
with the 'IN (@.MYPARAM) manner...too bad...will have to figure out a
work-around.|||I simulated your problem , it perfectly works for me..
Amarnath, MCTS.
"roy@.mgk.com" wrote:
> On Mar 27, 12:53 pm, r...@.mgk.com wrote:
> > On Mar 23, 1:21 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > wrote:
> >
> >
> >
> >
> >
> > > To be very clear, The problem is due to parameters only. First go to the
> > > report which you include as "Subreport" in the main report. open the report
> > > properties, check for multi-value.
> > > close that remaining same. (ie string, non queried or queried, default null.)
> >
> > > Go to the main report where you have placed subreport. on the subreport
> > > right click for properties and the parameter, this is the main culprit for
> > > not working.
> >
> > > Parameter Name: select from the drop down.
> > > Parameter Value: "=Parameters!cn.Value" here just include value instead of
> > > Value(0)
> >
> > > This should work. Let me know if it works.
> >
> > > Amarnath, MCTS.
> >
> > > "r...@.mgk.com" wrote:
> > > > On Mar 22, 8:07 am, r...@.mgk.com wrote:
> > > > > On Mar 21, 9:10 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > > > > wrote:
> >
> > > > > > on the subreport properties->parameters give
> > > > > > "=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
> > > > > > passed to the subreport as well.
> >
> > > > > > Amarnath, MCTS
> >
> > > > > > "r...@.mgk.com" wrote:
> > > > > > > ok - i've googled this and have tried everything to no avail...
> >
> > > > > > > parent report has multi-value parameter: part_code
> >
> > > > > > > this gets passed to subreport which has part_code setup as multi-
> > > > > > > valued paramter
> >
> > > > > > > what is the syntax in the parent...subreport properties/parameters box
> >
> > > > > > > and
> >
> > > > > > > what is the syntax in the child report parameters form?
> >
> > > > > > > thanks very much- Hide quoted text -
> >
> > > > > > - Show quoted text -
> >
> > > > > did that Amarnath ))...and i have in the parent the subreport
> > > > > properties/parameters: "=Parameters!PART_CODE"
> >
> > > > > all i get is 'error - subreport could not be shown'......- Hide quoted text -
> >
> > > > > - Show quoted text -
> >
> > > > i should've said i implemented that...as well as the "=Parameters!
> > > > PART_CODE" in my previous reply...
> >
> > > > is there some change in the SQL?...i'm just using the "....part_code
> > > > in (@.PART_CODE)" with the paramter setup normailly in the subreport's
> > > > report parameter properties......- Hide quoted text -
> >
> > > - Show quoted text -
> >
> > ((
> >
> > tried but not working...have logged incident with microsoft on this..- Hide quoted text -
> >
> > - Show quoted text -
> i've spoken to microsoft tech support - and they could not get it to
> work...i'm assuming at this point we cannot reference a multi-value
> paramenter in a subreport that rerferences it in the SQL statement
> with the 'IN (@.MYPARAM) manner...too bad...will have to figure out a
> work-around.
>|||On Mar 29, 1:24 am, Amarnath <Amarn...@.discussions.microsoft.com>
wrote:
> I simulated your problem , it perfectly works for me..
> Amarnath, MCTS.
>
> "r...@.mgk.com" wrote:
> > On Mar 27, 12:53 pm, r...@.mgk.com wrote:
> > > On Mar 23, 1:21 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > > wrote:
> > > > To be very clear, The problem is due to parameters only. First go to the
> > > > report which you include as "Subreport" in the main report. open the report
> > > > properties, check for multi-value.
> > > > close that remaining same. (ie string, non queried or queried, default null.)
> > > > Go to the main report where you have placed subreport. on the subreport
> > > > right click for properties and the parameter, this is the main culprit for
> > > > not working.
> > > > Parameter Name: select from the drop down.
> > > > Parameter Value: "=Parameters!cn.Value" here just include value instead of
> > > > Value(0)
> > > > This should work. Let me know if it works.
> > > > Amarnath, MCTS.
> > > > "r...@.mgk.com" wrote:
> > > > > On Mar 22, 8:07 am, r...@.mgk.com wrote:
> > > > > > On Mar 21, 9:10 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > > > > > wrote:
> > > > > > > on the subreport properties->parameters give
> > > > > > > "=Join(Parameters! <ParameterName> .Value,", ") so that the multi value is
> > > > > > > passed to the subreport as well.
> > > > > > > Amarnath, MCTS
> > > > > > > "r...@.mgk.com" wrote:
> > > > > > > > ok - i've googled this and have tried everything to no avail...
> > > > > > > > parent report has multi-value parameter: part_code
> > > > > > > > this gets passed to subreport which has part_code setup as multi-
> > > > > > > > valued paramter
> > > > > > > > what is the syntax in the parent...subreport properties/parameters box
> > > > > > > > and
> > > > > > > > what is the syntax in the child report parameters form?
> > > > > > > > thanks very much- Hide quoted text -
> > > > > > > - Show quoted text -
> > > > > > did that Amarnath ))...and i have in the parent the subreport
> > > > > > properties/parameters: "=Parameters!PART_CODE"
> > > > > > all i get is 'error - subreport could not be shown'......- Hide quoted text -
> > > > > > - Show quoted text -
> > > > > i should've said i implemented that...as well as the "=Parameters!
> > > > > PART_CODE" in my previous reply...
> > > > > is there some change in the SQL?...i'm just using the "....part_code
> > > > > in (@.PART_CODE)" with the paramter setup normailly in the subreport's
> > > > > report parameter properties......- Hide quoted text -
> > > > - Show quoted text -
> > > ((
> > > tried but not working...have logged incident with microsoft on this..- Hide quoted text -
> > > - Show quoted text -
> > i've spoken to microsoft tech support - and they could not get it to
> > work...i'm assuming at this point we cannot reference a multi-value
> > paramenter in a subreport that rerferences it in the SQL statement
> > with the 'IN (@.MYPARAM) manner...too bad...will have to figure out a
> > work-around.- Hide quoted text -
> - Show quoted text -
ok - this works when you have different names for the same parameter
in the parent and sub reports.......

Monday, March 12, 2012

Passing a multi-value parameter to a Subreport

How do I pass a multi-value parameter to a subreport?
For example, if my main report has a multi-value parameter named @.p1 and my
subreport's dataset is generated by SQL
SELECT a,b FROM MyTable WHERE a IN (@.LongList)
how do I then pass the user-selected @.p1 values from the main report to the
@.LongList parameter in the subreport?
I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it did not
work.
Any help/suggestions will be appreciated. Thanks in advanceThis is just a guess based on what I know is going on behind the covers but
try the following. In your subreport make the Report Parameter @.LongList a
multi-value parameter. Test the subreport stand alone and make sure it
works. Then drop the subreport into your main report, right mouse click on
it, parameters and map the report parameter from the subreport to the report
parameter from the main report. You should not have to do anything fancy.
Let me know if it works.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
news:4785EFE4-9436-4715-8AA4-A57CC8E9AC78@.microsoft.com...
> How do I pass a multi-value parameter to a subreport?
> For example, if my main report has a multi-value parameter named @.p1 and
> my
> subreport's dataset is generated by SQL
> SELECT a,b FROM MyTable WHERE a IN (@.LongList)
> how do I then pass the user-selected @.p1 values from the main report to
> the
> @.LongList parameter in the subreport?
> I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it did
> not
> work.
> Any help/suggestions will be appreciated. Thanks in advance
>|||Bruce,
This works. Once again - thanks for your help.
Isaak
"Bruce L-C [MVP]" wrote:
> This is just a guess based on what I know is going on behind the covers but
> try the following. In your subreport make the Report Parameter @.LongList a
> multi-value parameter. Test the subreport stand alone and make sure it
> works. Then drop the subreport into your main report, right mouse click on
> it, parameters and map the report parameter from the subreport to the report
> parameter from the main report. You should not have to do anything fancy.
> Let me know if it works.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
> news:4785EFE4-9436-4715-8AA4-A57CC8E9AC78@.microsoft.com...
> > How do I pass a multi-value parameter to a subreport?
> >
> > For example, if my main report has a multi-value parameter named @.p1 and
> > my
> > subreport's dataset is generated by SQL
> >
> > SELECT a,b FROM MyTable WHERE a IN (@.LongList)
> >
> > how do I then pass the user-selected @.p1 values from the main report to
> > the
> > @.LongList parameter in the subreport?
> >
> > I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it did
> > not
> > work.
> >
> > Any help/suggestions will be appreciated. Thanks in advance
> >
>
>|||Appreciate you getting back and letting me know the result. As I said it was
a guess on my part.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
news:D71C1BB0-7AB0-4CFF-BD5F-D6B789D59906@.microsoft.com...
> Bruce,
> This works. Once again - thanks for your help.
> Isaak
> "Bruce L-C [MVP]" wrote:
>> This is just a guess based on what I know is going on behind the covers
>> but
>> try the following. In your subreport make the Report Parameter @.LongList
>> a
>> multi-value parameter. Test the subreport stand alone and make sure it
>> works. Then drop the subreport into your main report, right mouse click
>> on
>> it, parameters and map the report parameter from the subreport to the
>> report
>> parameter from the main report. You should not have to do anything fancy.
>> Let me know if it works.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
>> news:4785EFE4-9436-4715-8AA4-A57CC8E9AC78@.microsoft.com...
>> > How do I pass a multi-value parameter to a subreport?
>> >
>> > For example, if my main report has a multi-value parameter named @.p1
>> > and
>> > my
>> > subreport's dataset is generated by SQL
>> >
>> > SELECT a,b FROM MyTable WHERE a IN (@.LongList)
>> >
>> > how do I then pass the user-selected @.p1 values from the main report to
>> > the
>> > @.LongList parameter in the subreport?
>> >
>> > I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it
>> > did
>> > not
>> > work.
>> >
>> > Any help/suggestions will be appreciated. Thanks in advance
>> >
>>|||Isaak,
Since yours works, may I ask you a question?
In my main report, the parameter that I want to pass to subreport is
"Fields!CallID.value", so I right-click the subreport in main report,
properties, parameter, parameter name is "CallID", parameter value is
"Fields!CallID.value". In my subreport, my sql query is (In subreport)
select Tracker, EntryDate, EntryText from dbo.Journal
where CallID = @.CallID
I go to paramters tab, I see the name is "@.CallID" and value ="Parameters!CallID.value".
when I run from main report, there is no error but subreport is not showing
in the main report. Do I miss something here? Thanks!
Henry
"isaak" wrote:
> Bruce,
> This works. Once again - thanks for your help.
> Isaak
> "Bruce L-C [MVP]" wrote:
> > This is just a guess based on what I know is going on behind the covers but
> > try the following. In your subreport make the Report Parameter @.LongList a
> > multi-value parameter. Test the subreport stand alone and make sure it
> > works. Then drop the subreport into your main report, right mouse click on
> > it, parameters and map the report parameter from the subreport to the report
> > parameter from the main report. You should not have to do anything fancy.
> >
> > Let me know if it works.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
> > news:4785EFE4-9436-4715-8AA4-A57CC8E9AC78@.microsoft.com...
> > > How do I pass a multi-value parameter to a subreport?
> > >
> > > For example, if my main report has a multi-value parameter named @.p1 and
> > > my
> > > subreport's dataset is generated by SQL
> > >
> > > SELECT a,b FROM MyTable WHERE a IN (@.LongList)
> > >
> > > how do I then pass the user-selected @.p1 values from the main report to
> > > the
> > > @.LongList parameter in the subreport?
> > >
> > > I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it did
> > > not
> > > work.
> > >
> > > Any help/suggestions will be appreciated. Thanks in advance
> > >
> >
> >
> >|||Issak,
I got it to work. Thanks!
Henry
"Henry Chen" wrote:
> Isaak,
> Since yours works, may I ask you a question?
> In my main report, the parameter that I want to pass to subreport is
> "Fields!CallID.value", so I right-click the subreport in main report,
> properties, parameter, parameter name is "CallID", parameter value is
> "Fields!CallID.value". In my subreport, my sql query is (In subreport)
> select Tracker, EntryDate, EntryText from dbo.Journal
> where CallID = @.CallID
> I go to paramters tab, I see the name is "@.CallID" and value => "Parameters!CallID.value".
> when I run from main report, there is no error but subreport is not showing
> in the main report. Do I miss something here? Thanks!
> Henry
> "isaak" wrote:
> > Bruce,
> >
> > This works. Once again - thanks for your help.
> >
> > Isaak
> >
> > "Bruce L-C [MVP]" wrote:
> >
> > > This is just a guess based on what I know is going on behind the covers but
> > > try the following. In your subreport make the Report Parameter @.LongList a
> > > multi-value parameter. Test the subreport stand alone and make sure it
> > > works. Then drop the subreport into your main report, right mouse click on
> > > it, parameters and map the report parameter from the subreport to the report
> > > parameter from the main report. You should not have to do anything fancy.
> > >
> > > Let me know if it works.
> > >
> > >
> > > --
> > > Bruce Loehle-Conger
> > > MVP SQL Server Reporting Services
> > >
> > > "isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
> > > news:4785EFE4-9436-4715-8AA4-A57CC8E9AC78@.microsoft.com...
> > > > How do I pass a multi-value parameter to a subreport?
> > > >
> > > > For example, if my main report has a multi-value parameter named @.p1 and
> > > > my
> > > > subreport's dataset is generated by SQL
> > > >
> > > > SELECT a,b FROM MyTable WHERE a IN (@.LongList)
> > > >
> > > > how do I then pass the user-selected @.p1 values from the main report to
> > > > the
> > > > @.LongList parameter in the subreport?
> > > >
> > > > I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it did
> > > > not
> > > > work.
> > > >
> > > > Any help/suggestions will be appreciated. Thanks in advance
> > > >
> > >
> > >
> > >|||Sorry Isac,
I was trying to do the same thing but it did not work for me. Am I missing
something?
"Bruce L-C [MVP]" wrote:
> This is just a guess based on what I know is going on behind the covers but
> try the following. In your subreport make the Report Parameter @.LongList a
> multi-value parameter. Test the subreport stand alone and make sure it
> works. Then drop the subreport into your main report, right mouse click on
> it, parameters and map the report parameter from the subreport to the report
> parameter from the main report. You should not have to do anything fancy.
> Let me know if it works.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
> news:4785EFE4-9436-4715-8AA4-A57CC8E9AC78@.microsoft.com...
> > How do I pass a multi-value parameter to a subreport?
> >
> > For example, if my main report has a multi-value parameter named @.p1 and
> > my
> > subreport's dataset is generated by SQL
> >
> > SELECT a,b FROM MyTable WHERE a IN (@.LongList)
> >
> > how do I then pass the user-selected @.p1 values from the main report to
> > the
> > @.LongList parameter in the subreport?
> >
> > I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it did
> > not
> > work.
> >
> > Any help/suggestions will be appreciated. Thanks in advance
> >
>
>|||Sorry I forgot to mention, did you manage to get working with multivalue
parameter?
"Henry Chen" wrote:
> Issak,
> I got it to work. Thanks!
> Henry
> "Henry Chen" wrote:
> > Isaak,
> > Since yours works, may I ask you a question?
> >
> > In my main report, the parameter that I want to pass to subreport is
> > "Fields!CallID.value", so I right-click the subreport in main report,
> > properties, parameter, parameter name is "CallID", parameter value is
> > "Fields!CallID.value". In my subreport, my sql query is (In subreport)
> >
> > select Tracker, EntryDate, EntryText from dbo.Journal
> > where CallID = @.CallID
> >
> > I go to paramters tab, I see the name is "@.CallID" and value => > "Parameters!CallID.value".
> >
> > when I run from main report, there is no error but subreport is not showing
> > in the main report. Do I miss something here? Thanks!
> > Henry
> >
> > "isaak" wrote:
> >
> > > Bruce,
> > >
> > > This works. Once again - thanks for your help.
> > >
> > > Isaak
> > >
> > > "Bruce L-C [MVP]" wrote:
> > >
> > > > This is just a guess based on what I know is going on behind the covers but
> > > > try the following. In your subreport make the Report Parameter @.LongList a
> > > > multi-value parameter. Test the subreport stand alone and make sure it
> > > > works. Then drop the subreport into your main report, right mouse click on
> > > > it, parameters and map the report parameter from the subreport to the report
> > > > parameter from the main report. You should not have to do anything fancy.
> > > >
> > > > Let me know if it works.
> > > >
> > > >
> > > > --
> > > > Bruce Loehle-Conger
> > > > MVP SQL Server Reporting Services
> > > >
> > > > "isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
> > > > news:4785EFE4-9436-4715-8AA4-A57CC8E9AC78@.microsoft.com...
> > > > > How do I pass a multi-value parameter to a subreport?
> > > > >
> > > > > For example, if my main report has a multi-value parameter named @.p1 and
> > > > > my
> > > > > subreport's dataset is generated by SQL
> > > > >
> > > > > SELECT a,b FROM MyTable WHERE a IN (@.LongList)
> > > > >
> > > > > how do I then pass the user-selected @.p1 values from the main report to
> > > > > the
> > > > > @.LongList parameter in the subreport?
> > > > >
> > > > > I tried specifying JOIN(@.P1.Value,",") for a parameter value, but it did
> > > > > not
> > > > > work.
> > > > >
> > > > > Any help/suggestions will be appreciated. Thanks in advance
> > > > >
> > > >
> > > >
> > > >

Wednesday, March 7, 2012

pass results from main report to use as multi-value parameter in s

Hey all,
Don't know if this is possible, but here goes:
I need to display the results of the main report, allow users to make
multiple selections from the report and have those selections passed to a
subreport. In the subreport users must be able to update a quantity field in
the result set for each row, and then THIS result set creates another
subreport. I have several SP's that will create the reports if I have the
appropriate parameters, but how do I pass this information - and is updating
feasible?
Thanks!
--
CheriForgot to mention that I'm using RS 2005 and SQL Server 2005.
--
Cheri
"OyVey" wrote:
> Hey all,
> Don't know if this is possible, but here goes:
> I need to display the results of the main report, allow users to make
> multiple selections from the report and have those selections passed to a
> subreport. In the subreport users must be able to update a quantity field in
> the result set for each row, and then THIS result set creates another
> subreport. I have several SP's that will create the reports if I have the
> appropriate parameters, but how do I pass this information - and is updating
> feasible?
> Thanks!
> --
> Cheri|||No, but can be done using custom applications, but that will be meaning less
because you need to do a lot of coding, might as well you can code the entire
thing, but otherwise this is not possible in RS.
Amarnath
"OyVey" wrote:
> Forgot to mention that I'm using RS 2005 and SQL Server 2005.
> --
> Cheri
>
> "OyVey" wrote:
> > Hey all,
> >
> > Don't know if this is possible, but here goes:
> >
> > I need to display the results of the main report, allow users to make
> > multiple selections from the report and have those selections passed to a
> > subreport. In the subreport users must be able to update a quantity field in
> > the result set for each row, and then THIS result set creates another
> > subreport. I have several SP's that will create the reports if I have the
> > appropriate parameters, but how do I pass this information - and is updating
> > feasible?
> >
> > Thanks!
> > --
> > Cheri

Saturday, February 25, 2012

Pass a Parameter into a textbox on a report?

I have a report that is unsing a multi-value parameter selection list. Based on the parameter I select, I would like to display the selection in a textbox directly on the report. Would someone know what statement I place into the textbox to capture the parameter:

Some details: 'read_perflvl' is the data field in the original database. 'perflvl' is the name of my report parameter.

I dropped the 'read_perflvl' field into the text box on my report and it defaulted to

"=First(Fields!read_perflvl.Value)" , and this actually worked fine if I selected only one parameter. But if I selected two or more from the multi-valued parameter list, it only shows the first one (clearly due to the FIRST function it is referencing) in the textbox.

Is there a different prefix to the statement that I can use so that it will display all of the parameter values I select?

Thanks for any suggestions.

Dear esloat,

try the following expression in the text box.

-right click on the text box and select expression from the drop down menu.

-then write the following expression:

=parameters!perflvl.value

I think this should display the value of the selected parameter in the text box.

Sincerely,

Amde

|||

Amde, Wow, great minds think alike. Just as I received your message I had pasted that exact expression into the textbox - I lifted it from the code block that was refering to the parameter in the report.

Unfortunately when I run the report I get a non-discript '#ERROR' message returned. The rest of the report runs fine, but the value of the textbox displays as an error.

Might this be due to a conflict between a string and numeric value? The originating database field is a string. Does the parameter expression store the result as a numeric value?

Anyway, I'll keep trying and post if I resolve the error message. Thanks.

|||hi , u havnt tld me frm where to pass frm asp.net to reports . so u can do as report parameter id=new report parameter()
id.name="ur id name";
id.values.add(textbox1.text);
reportviewer.serverreport(id)

..in reports ,, use same field(=fileds!database.value)

deploy report,, and use in asp.net as
reportviewer.reportpath="report path" as "/ report project1/reports"