Hello,
When I lunch my report I want to display a pull-down menu
based on the user id. I know how to get userid but I do
not know how I can use it to display pull-down menu, for
some user id I should not display anything. Also if I
display the pull-down, after selection I should write
value selected to a table in SQL. How can I do that?
Thanks,
Jim.Throw the userid in the WHERE clause (assuming you are using a query
for the pull-down).
SELECT *
FROM tblPullDownMenu
WHERE userid = user.userid
"JIM.H." <anonymous@.discussions.microsoft.com> wrote in message news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
> Hello,
> When I lunch my report I want to display a pull-down menu
> based on the user id. I know how to get userid but I do
> not know how I can use it to display pull-down menu, for
> some user id I should not display anything. Also if I
> display the pull-down, after selection I should write
> value selected to a table in SQL. How can I do that?
> Thanks,
> Jim.|||Minor clarification: This would have to be a query expression:
="SELECT * FROM tblPullDownMenu WHERE userid = " & User!UserID
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
news:e876e3c8.0407201152.7951b8c5@.posting.google.com...
> Throw the userid in the WHERE clause (assuming you are using a query
> for the pull-down).
> SELECT *
> FROM tblPullDownMenu
> WHERE userid = user.userid
>
> "JIM.H." <anonymous@.discussions.microsoft.com> wrote in message
news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
> > Hello,
> > When I lunch my report I want to display a pull-down menu
> > based on the user id. I know how to get userid but I do
> > not know how I can use it to display pull-down menu, for
> > some user id I should not display anything. Also if I
> > display the pull-down, after selection I should write
> > value selected to a table in SQL. How can I do that?
> > Thanks,
> > Jim.|||Thanks, Where should I use this SQL. Let's say, I am
running my report, at that time I need to check If this
string returns anything, if not display a pulldown menu,
accept user selection and update tblPullDownMenu.
How shoudl I do this? I am new at reporting.
>--Original Message--
>Minor clarification: This would have to be a query
expression:
>="SELECT * FROM tblPullDownMenu WHERE userid = " &
User!UserID
>--
>Ravi Mumulla (Microsoft)
>SQL Server Reporting Services
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
>news:e876e3c8.0407201152.7951b8c5@.posting.google.com...
>> Throw the userid in the WHERE clause (assuming you are
using a query
>> for the pull-down).
>> SELECT *
>> FROM tblPullDownMenu
>> WHERE userid = user.userid
>>
>> "JIM.H." <anonymous@.discussions.microsoft.com> wrote in
message
>news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
>> > Hello,
>> > When I lunch my report I want to display a pull-down
menu
>> > based on the user id. I know how to get userid but I
do
>> > not know how I can use it to display pull-down menu,
for
>> > some user id I should not display anything. Also if I
>> > display the pull-down, after selection I should write
>> > value selected to a table in SQL. How can I do that?
>> > Thanks,
>> > Jim.
>
>.
>|||This should be typed into the Data pane of report designer.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JIM.H." <anonymous@.discussions.microsoft.com> wrote in message
news:0da201c46e9a$31884690$a301280a@.phx.gbl...
> Thanks, Where should I use this SQL. Let's say, I am
> running my report, at that time I need to check If this
> string returns anything, if not display a pulldown menu,
> accept user selection and update tblPullDownMenu.
> How shoudl I do this? I am new at reporting.
>
> >--Original Message--
> >Minor clarification: This would have to be a query
> expression:
> >
> >="SELECT * FROM tblPullDownMenu WHERE userid = " &
> User!UserID
> >
> >--
> >Ravi Mumulla (Microsoft)
> >SQL Server Reporting Services
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
> >news:e876e3c8.0407201152.7951b8c5@.posting.google.com...
> >> Throw the userid in the WHERE clause (assuming you are
> using a query
> >> for the pull-down).
> >>
> >> SELECT *
> >> FROM tblPullDownMenu
> >> WHERE userid = user.userid
> >>
> >>
> >> "JIM.H." <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
> >> > Hello,
> >> > When I lunch my report I want to display a pull-down
> menu
> >> > based on the user id. I know how to get userid but I
> do
> >> > not know how I can use it to display pull-down menu,
> for
> >> > some user id I should not display anything. Also if I
> >> > display the pull-down, after selection I should write
> >> > value selected to a table in SQL. How can I do that?
> >> > Thanks,
> >> > Jim.
> >
> >
> >.
> >|||Ravi, you know me, I need a little bit more help. LOL.
what should I do to make sure that the oulldown item
visaible and invisibale. I have more question below.
Thanks,
Jim.
>--Original Message--
>This should be typed into the Data pane of report
designer.
>--
>Ravi Mumulla (Microsoft)
>SQL Server Reporting Services
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
message
>news:0da201c46e9a$31884690$a301280a@.phx.gbl...
>> Thanks, Where should I use this SQL. Let's say, I am
>> running my report, at that time I need to check If this
>> string returns anything, if not display a pulldown menu,
>> accept user selection and update tblPullDownMenu.
>> How shoudl I do this? I am new at reporting.
>>
>> >--Original Message--
>> >Minor clarification: This would have to be a query
>> expression:
>> >
>> >="SELECT * FROM tblPullDownMenu WHERE userid = " &
>> User!UserID
>> >
>> >--
>> >Ravi Mumulla (Microsoft)
>> >SQL Server Reporting Services
>> >
>> >This posting is provided "AS IS" with no warranties,
and
>> confers no rights.
>> >"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
>> >news:e876e3c8.0407201152.7951b8c5@.posting.google.com...
>> >> Throw the userid in the WHERE clause (assuming you
are
>> using a query
>> >> for the pull-down).
>> >>
>> >> SELECT *
>> >> FROM tblPullDownMenu
>> >> WHERE userid = user.userid
>> >>
>> >>
>> >> "JIM.H." <anonymous@.discussions.microsoft.com> wrote
in
>> message
>> >news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
>> >> > Hello,
>> >> > When I lunch my report I want to display a pull-
down
>> menu
>> >> > based on the user id. I know how to get userid but
I
>> do
>> >> > not know how I can use it to display pull-down
menu,
>> for
>> >> > some user id I should not display anything. Also
if I
>> >> > display the pull-down, after selection I should
write
>> >> > value selected to a table in SQL. How can I do
that?
>> >> > Thanks,
>> >> > Jim.
>> >
>> >
>> >.
>> >
>
>.
>|||Could you please describe what you're trying to do in more detail? By
pulldown menu, do you mean the report parameters dropdown?
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JIM.H." <anonymous@.discussions.microsoft.com> wrote in message
news:0d1901c46ea3$9d514490$a401280a@.phx.gbl...
> Ravi, you know me, I need a little bit more help. LOL.
> what should I do to make sure that the oulldown item
> visaible and invisibale. I have more question below.
> Thanks,
> Jim.
> >--Original Message--
> >This should be typed into the Data pane of report
> designer.
> >
> >--
> >Ravi Mumulla (Microsoft)
> >SQL Server Reporting Services
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:0da201c46e9a$31884690$a301280a@.phx.gbl...
> >> Thanks, Where should I use this SQL. Let's say, I am
> >> running my report, at that time I need to check If this
> >> string returns anything, if not display a pulldown menu,
> >> accept user selection and update tblPullDownMenu.
> >> How shoudl I do this? I am new at reporting.
> >>
> >>
> >> >--Original Message--
> >> >Minor clarification: This would have to be a query
> >> expression:
> >> >
> >> >="SELECT * FROM tblPullDownMenu WHERE userid = " &
> >> User!UserID
> >> >
> >> >--
> >> >Ravi Mumulla (Microsoft)
> >> >SQL Server Reporting Services
> >> >
> >> >This posting is provided "AS IS" with no warranties,
> and
> >> confers no rights.
> >> >"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
> >> >news:e876e3c8.0407201152.7951b8c5@.posting.google.com...
> >> >> Throw the userid in the WHERE clause (assuming you
> are
> >> using a query
> >> >> for the pull-down).
> >> >>
> >> >> SELECT *
> >> >> FROM tblPullDownMenu
> >> >> WHERE userid = user.userid
> >> >>
> >> >>
> >> >> "JIM.H." <anonymous@.discussions.microsoft.com> wrote
> in
> >> message
> >> >news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
> >> >> > Hello,
> >> >> > When I lunch my report I want to display a pull-
> down
> >> menu
> >> >> > based on the user id. I know how to get userid but
> I
> >> do
> >> >> > not know how I can use it to display pull-down
> menu,
> >> for
> >> >> > some user id I should not display anything. Also
> if I
> >> >> > display the pull-down, after selection I should
> write
> >> >> > value selected to a table in SQL. How can I do
> that?
> >> >> > Thanks,
> >> >> > Jim.
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >|||Hello,
I have a table:UserArea that has UserId and Area fields.
When the users run the report I want to check if the user
is available in UserArea table, if yes, I will display
the report by taking this area into consideration, if not,
I have another table: Areas, I should display this areas
to the user as a pull-down menu so that he can select one
area, after selection I should update UserArea table and
display report based on area again. So I am building
UserArea table while people are running report to give
results based on the area they are in.
Is this possible?
Jim.
>--Original Message--
>Could you please describe what you're trying to do in
more detail? By
>pulldown menu, do you mean the report parameters dropdown?
>--
>Ravi Mumulla (Microsoft)
>SQL Server Reporting Services
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
message
>news:0d1901c46ea3$9d514490$a401280a@.phx.gbl...
>> Ravi, you know me, I need a little bit more help. LOL.
>> what should I do to make sure that the oulldown item
>> visaible and invisibale. I have more question below.
>> Thanks,
>> Jim.
>> >--Original Message--
>> >This should be typed into the Data pane of report
>> designer.
>> >
>> >--
>> >Ravi Mumulla (Microsoft)
>> >SQL Server Reporting Services
>> >
>> >This posting is provided "AS IS" with no warranties,
and
>> confers no rights.
>> >"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:0da201c46e9a$31884690$a301280a@.phx.gbl...
>> >> Thanks, Where should I use this SQL. Let's say, I am
>> >> running my report, at that time I need to check If
this
>> >> string returns anything, if not display a pulldown
menu,
>> >> accept user selection and update tblPullDownMenu.
>> >> How shoudl I do this? I am new at reporting.
>> >>
>> >>
>> >> >--Original Message--
>> >> >Minor clarification: This would have to be a query
>> >> expression:
>> >> >
>> >> >="SELECT * FROM tblPullDownMenu WHERE userid = "
&
>> >> User!UserID
>> >> >
>> >> >--
>> >> >Ravi Mumulla (Microsoft)
>> >> >SQL Server Reporting Services
>> >> >
>> >> >This posting is provided "AS IS" with no warranties,
>> and
>> >> confers no rights.
>> >> >"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
>> >>
>news:e876e3c8.0407201152.7951b8c5@.posting.google.com...
>> >> >> Throw the userid in the WHERE clause (assuming you
>> are
>> >> using a query
>> >> >> for the pull-down).
>> >> >>
>> >> >> SELECT *
>> >> >> FROM tblPullDownMenu
>> >> >> WHERE userid = user.userid
>> >> >>
>> >> >>
>> >> >> "JIM.H." <anonymous@.discussions.microsoft.com>
wrote
>> in
>> >> message
>> >> >news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
>> >> >> > Hello,
>> >> >> > When I lunch my report I want to display a pull-
>> down
>> >> menu
>> >> >> > based on the user id. I know how to get userid
but
>> I
>> >> do
>> >> >> > not know how I can use it to display pull-down
>> menu,
>> >> for
>> >> >> > some user id I should not display anything. Also
>> if I
>> >> >> > display the pull-down, after selection I should
>> write
>> >> >> > value selected to a table in SQL. How can I do
>> that?
>> >> >> > Thanks,
>> >> >> > Jim.
>> >> >
>> >> >
>> >> >.
>> >> >
>> >
>> >
>> >.
>> >
>
>.
>|||Assuming you want to display data from table called Table_A, here's the
query I'd use in the data pane:
="select ta.* from Table_A ta, UserArea ua where ta.Area = ua.Area and
ua.UserID = " & User!UserID
On your second question, here's the approach I'd take:
1. Create a stored procedure that takes the userID as a parameter and checks
whether that userID is in the UserArea table. If is exists in that table,
don't return any rows. I it doesn't exist, return all Areas. Something like
follows:
drop proc sp_testuser
create proc sp_testuser (@.userIDParam varchar(32))
AS
BEGIN
select Area from testuser where not exists (select * from testuser where
userID = @.userIDParam)
END
2. Create a dataset based on the above stored procedure.
3. Create a query-based parameter list based on the dataset in previous step
(while in the Layout tab, go to Report menu item and choose Report
Parameters.)
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JIM.H." <anonymous@.discussions.microsoft.com> wrote in message
news:172801c46f50$3bdc0bc0$a401280a@.phx.gbl...
> Hello,
> I have a table:UserArea that has UserId and Area fields.
> When the users run the report I want to check if the user
> is available in UserArea table, if yes, I will display
> the report by taking this area into consideration, if not,
> I have another table: Areas, I should display this areas
> to the user as a pull-down menu so that he can select one
> area, after selection I should update UserArea table and
> display report based on area again. So I am building
> UserArea table while people are running report to give
> results based on the area they are in.
> Is this possible?
> Jim.
> >--Original Message--
> >Could you please describe what you're trying to do in
> more detail? By
> >pulldown menu, do you mean the report parameters dropdown?
> >
> >--
> >Ravi Mumulla (Microsoft)
> >SQL Server Reporting Services
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:0d1901c46ea3$9d514490$a401280a@.phx.gbl...
> >> Ravi, you know me, I need a little bit more help. LOL.
> >> what should I do to make sure that the oulldown item
> >> visaible and invisibale. I have more question below.
> >> Thanks,
> >> Jim.
> >>
> >> >--Original Message--
> >> >This should be typed into the Data pane of report
> >> designer.
> >> >
> >> >--
> >> >Ravi Mumulla (Microsoft)
> >> >SQL Server Reporting Services
> >> >
> >> >This posting is provided "AS IS" with no warranties,
> and
> >> confers no rights.
> >> >"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
> >> message
> >> >news:0da201c46e9a$31884690$a301280a@.phx.gbl...
> >> >> Thanks, Where should I use this SQL. Let's say, I am
> >> >> running my report, at that time I need to check If
> this
> >> >> string returns anything, if not display a pulldown
> menu,
> >> >> accept user selection and update tblPullDownMenu.
> >> >> How shoudl I do this? I am new at reporting.
> >> >>
> >> >>
> >> >> >--Original Message--
> >> >> >Minor clarification: This would have to be a query
> >> >> expression:
> >> >> >
> >> >> >="SELECT * FROM tblPullDownMenu WHERE userid = "
> &
> >> >> User!UserID
> >> >> >
> >> >> >--
> >> >> >Ravi Mumulla (Microsoft)
> >> >> >SQL Server Reporting Services
> >> >> >
> >> >> >This posting is provided "AS IS" with no warranties,
> >> and
> >> >> confers no rights.
> >> >> >"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
> >> >>
> >news:e876e3c8.0407201152.7951b8c5@.posting.google.com...
> >> >> >> Throw the userid in the WHERE clause (assuming you
> >> are
> >> >> using a query
> >> >> >> for the pull-down).
> >> >> >>
> >> >> >> SELECT *
> >> >> >> FROM tblPullDownMenu
> >> >> >> WHERE userid = user.userid
> >> >> >>
> >> >> >>
> >> >> >> "JIM.H." <anonymous@.discussions.microsoft.com>
> wrote
> >> in
> >> >> message
> >> >> >news:<08d201c46e65$5bc843e0$a601280a@.phx.gbl>...
> >> >> >> > Hello,
> >> >> >> > When I lunch my report I want to display a pull-
> >> down
> >> >> menu
> >> >> >> > based on the user id. I know how to get userid
> but
> >> I
> >> >> do
> >> >> >> > not know how I can use it to display pull-down
> >> menu,
> >> >> for
> >> >> >> > some user id I should not display anything. Also
> >> if I
> >> >> >> > display the pull-down, after selection I should
> >> write
> >> >> >> > value selected to a table in SQL. How can I do
> >> that?
> >> >> >> > Thanks,
> >> >> >> > Jim.
> >> >> >
> >> >> >
> >> >> >.
> >> >> >
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment