on 10-24-2014 12:03 AM
Hello All,
I want to pass the Username and time(current month/week) for logged In user when he runs the report. For example if user
is logging in to BO report with username:Peter and password:12345 then when he clicks on the report
then report should run for only that user name which is "Peter" and also it should auto populate
the current week. Please provide your useful inputs. This is BO on MS SQL server setup. Universes
are directly built on MYsql server tables.
Thanks,
Sam
Hi Sam,
Create a two optional prompt one for User and another for Time by selecting only the Optional Prompt check box from Prompt Properties on the Query Filter.
Create a Variable for User
=If(IsPromptAnswered("User")) Then [User Field from MySQL] Else CurrentUser()
Create a Variable for Time
=If(IsPromptAnswered("Time")) Then [Time Field from MySQL] Else CurrentTime()
In WebI there is a function named CurrentUser() which will return the ID of the user who runs the report.
This will generate the Report with default BO user who has logged in at that time. Hope this information helps you to some extent.
---Raji. S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sam,
We have option in Crystal Report as well. You can retrieve the user by using the following function.
In Special Fields -> Current CE User Time Zone,
Current CE User ID,
Data Date
Goto Field Explorer -> Parameter Fields, provide the details and mark Optional Prompt as True and then Reports -> Select Expert -> Record to map the fields.
--Raji. S
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.