Is it possible to show current Login userName on a report?
Answered
Hi,
Is it possible to show current Login userName on a report?
Regards
Pratap
Hi,
Is it possible to show current Login userName on a report?
Regards
Pratap
I would imagine that if you have access filters on and can somehow default it to the current user then you can pull in that filter information by using a method called Parameter Replacement. I do not have access to access filters to verify this but take a quick look at the below on how to perform parameter replacement and perhaps go from there.
http://wiki.yellowfin.com.au/display/USER73Plus/Parameter+Replacement
I would imagine that if you have access filters on and can somehow default it to the current user then you can pull in that filter information by using a method called Parameter Replacement. I do not have access to access filters to verify this but take a quick look at the below on how to perform parameter replacement and perhaps go from there.
http://wiki.yellowfin.com.au/display/USER73Plus/Parameter+Replacement
I think I have a solution but it all hinges on access filters and since I do not have the ability to use them I cannot guarantee this solution will work. Here is my theory. It shouldn't take long to prove it once you activate access filters.
First, create a simple calculated field with the value of 1.
Then create a sub query( to your user's or employee table. Wherever you get the username and also set the access filter too. In that subquery(Append-Left Outer Join), create a calculated field with the value of 1. Use the two calculated fields as the join fields.
Then drop the username field into the filter section and chagne the operand to Equal to(This must be done or it will not populate unless you click on the username).
I'm guessing that the access filter will filter out all other users and only point to the current user(hopefully). Since this is an outer join where both calculated values are 1 and 1 there shouldn't be any issues with the data (no duplication, denial of access, etc).
In the filter for the username make it Value List Selection and Cached Values On Demand. This will make sure that the username pops up before the report runs and also forces a value their making sure it's not blank.
Once this is done you can use parameter replacement to drop the username from that filter into the report like so:
Click on preview and GO
I think I have a solution but it all hinges on access filters and since I do not have the ability to use them I cannot guarantee this solution will work. Here is my theory. It shouldn't take long to prove it once you activate access filters.
First, create a simple calculated field with the value of 1.
Then create a sub query( to your user's or employee table. Wherever you get the username and also set the access filter too. In that subquery(Append-Left Outer Join), create a calculated field with the value of 1. Use the two calculated fields as the join fields.
Then drop the username field into the filter section and chagne the operand to Equal to(This must be done or it will not populate unless you click on the username).
I'm guessing that the access filter will filter out all other users and only point to the current user(hopefully). Since this is an outer join where both calculated values are 1 and 1 there shouldn't be any issues with the data (no duplication, denial of access, etc).
In the filter for the username make it Value List Selection and Cached Values On Demand. This will make sure that the username pops up before the report runs and also forces a value their making sure it's not blank.
Once this is done you can use parameter replacement to drop the username from that filter into the report like so:
Click on preview and GO
https://community.yellowfinbi.com/topic/smart-reporting-login-user-as-a-filter
https://community.yellowfinbi.com/topic/smart-reporting-login-user-as-a-filter
Thanks Larry,
This is a bit more elegant than the solution I would have suggested :)
Pratap,
Please let us know if this does not work for you.
Nathan
Thanks Larry,
This is a bit more elegant than the solution I would have suggested :)
Pratap,
Please let us know if this does not work for you.
Nathan
Replies have been locked on this page!