Wednesday, March 28, 2012

Hide Dropdown parameter values based on User

I need to hide dropdown parameter values based on UserId. Any help with
User!UserId and custom code will be helpful. This is a Non-queried dropdown
and not based on query/dataset.
Thanks!To show either with drop down or without drop down, is not present in RS.
you didnt mention if it is not there, then do what ? means whether you want
emtpy or with one value or it should not show the drop down instead it should
run the report directly with some default values.
A round about way is to have a plain menu sort of report where you have two
options, I mean here is that when ever user clicks the reports, a screen will
be there with menu options like two hyperlinks (can be done using action)
before that you need to create a copy of the report, so you have now two
same reports one with drop down and the other without drop down.
Now depending on the user you can select or hide the textbox itself so the
user will be left with selecting one option.
If you dont understand I will put it in other words.
Before your two reports (one with dropdown and the other without dropdown)
one plain just hyperlink report will be there, where in user will select
the link to go to the respective reports.
Let me know if you have doubts.
Amarnath, MCTS
"RAGHAVAN JAYARAMAN" wrote:
> I need to hide dropdown parameter values based on UserId. Any help with
> User!UserId and custom code will be helpful. This is a Non-queried dropdown
> and not based on query/dataset.
> Thanks!|||On Mar 14, 3:01 am, Amarnath <Amarn...@.discussions.microsoft.com>
wrote:
> To show either with drop down or without drop down, is not present in RS.
> you didnt mention if it is not there, then do what ? means whether you want
> emtpy or with one value or it should not show the drop down instead it should
> run the report directly with some default values.
> A round about way is to have a plain menu sort of report where you have two
> options, I mean here is that when ever user clicks the reports, a screen will
> be there with menu options like two hyperlinks (can be done using action)
> before that you need to create a copy of the report, so you have now two
> same reports one with drop down and the other without drop down.
> Now depending on the user you can select or hide the textbox itself so the
> user will be left with selecting one option.
> If you dont understand I will put it in other words.
> Before your two reports (one with dropdown and the other without dropdown)
> one plain just hyperlink report will be there, where in user will select
> the link to go to the respective reports.
> Let me know if you have doubts.
> Amarnath, MCTS
> "RAGHAVAN JAYARAMAN" wrote:
> > I need to hide dropdown parameter values based on UserId. Any help with
> > User!UserId and custom code will be helpful. This is a Non-queried dropdown
> > and not based on query/dataset.
> > Thanks!
Another way of doing it is to use '=User!UserID.ToString' as the input
parameter to the dataset (stored procedure/query) and in the stored
procedure/query, give a default value when UserID matches certain
criteria. Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||I guess i didn't mention properly, In this case say for instance User 1 , i
would want to display 2 values and for user 2 i would want to display 5 value
on the dropdown.
However if use a query dataset , then i could pass UserId as per Enrique
suggestion.
Thanks!
"EMartinez" wrote:
> On Mar 14, 3:01 am, Amarnath <Amarn...@.discussions.microsoft.com>
> wrote:
> > To show either with drop down or without drop down, is not present in RS.
> > you didnt mention if it is not there, then do what ? means whether you want
> > emtpy or with one value or it should not show the drop down instead it should
> > run the report directly with some default values.
> > A round about way is to have a plain menu sort of report where you have two
> > options, I mean here is that when ever user clicks the reports, a screen will
> > be there with menu options like two hyperlinks (can be done using action)
> > before that you need to create a copy of the report, so you have now two
> > same reports one with drop down and the other without drop down.
> > Now depending on the user you can select or hide the textbox itself so the
> > user will be left with selecting one option.
> > If you dont understand I will put it in other words.
> >
> > Before your two reports (one with dropdown and the other without dropdown)
> > one plain just hyperlink report will be there, where in user will select
> > the link to go to the respective reports.
> > Let me know if you have doubts.
> >
> > Amarnath, MCTS
> >
> > "RAGHAVAN JAYARAMAN" wrote:
> > > I need to hide dropdown parameter values based on UserId. Any help with
> > > User!UserId and custom code will be helpful. This is a Non-queried dropdown
> > > and not based on query/dataset.
> >
> > > Thanks!
> Another way of doing it is to use '=User!UserID.ToString' as the input
> parameter to the dataset (stored procedure/query) and in the stored
> procedure/query, give a default value when UserID matches certain
> criteria. Hope this helps.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>|||Ok, So in that case the query which you have for displaying the drop down,
you can pass user id and get the filtered records depending on the user. But
you need to have queried drop down only. Otherwise it is not possible on a
non queried.
Amarnath, MCTS
"RAGHAVAN JAYARAMAN" wrote:
> I guess i didn't mention properly, In this case say for instance User 1 , i
> would want to display 2 values and for user 2 i would want to display 5 value
> on the dropdown.
> However if use a query dataset , then i could pass UserId as per Enrique
> suggestion.
> Thanks!
> "EMartinez" wrote:
> > On Mar 14, 3:01 am, Amarnath <Amarn...@.discussions.microsoft.com>
> > wrote:
> > > To show either with drop down or without drop down, is not present in RS.
> > > you didnt mention if it is not there, then do what ? means whether you want
> > > emtpy or with one value or it should not show the drop down instead it should
> > > run the report directly with some default values.
> > > A round about way is to have a plain menu sort of report where you have two
> > > options, I mean here is that when ever user clicks the reports, a screen will
> > > be there with menu options like two hyperlinks (can be done using action)
> > > before that you need to create a copy of the report, so you have now two
> > > same reports one with drop down and the other without drop down.
> > > Now depending on the user you can select or hide the textbox itself so the
> > > user will be left with selecting one option.
> > > If you dont understand I will put it in other words.
> > >
> > > Before your two reports (one with dropdown and the other without dropdown)
> > > one plain just hyperlink report will be there, where in user will select
> > > the link to go to the respective reports.
> > > Let me know if you have doubts.
> > >
> > > Amarnath, MCTS
> > >
> > > "RAGHAVAN JAYARAMAN" wrote:
> > > > I need to hide dropdown parameter values based on UserId. Any help with
> > > > User!UserId and custom code will be helpful. This is a Non-queried dropdown
> > > > and not based on query/dataset.
> > >
> > > > Thanks!
> >
> > Another way of doing it is to use '=User!UserID.ToString' as the input
> > parameter to the dataset (stored procedure/query) and in the stored
> > procedure/query, give a default value when UserID matches certain
> > criteria. Hope this helps.
> >
> > Regards,
> >
> > Enrique Martinez
> > Sr. SQL Server Developer
> >
> >

No comments:

Post a Comment