We use a construction software, Viewpoint. We need a report to print the GL Accounts associated only with the user running the report. I was wondering if anyone had any ideas on how I could easily and efficiently achieve this? My "last-resort alternative" is just creating separate reports for each GL that pulls only that GL's info.
How do we make a crystal report print only specific fields based off of the user running the report?
1.6k views Asked by Alicia Uhacz AtThere are 2 answers
You can get the current user name and use it to filter the records in your report. There are 2 ways to do this :
create a parameter, hide it and automatically fill the value. You will need a special viewer for this scenario. Let me know if this is what would you prefer I can give you some links. If you leave the parameter visible the user can insert any value and view any records
use an UFL . For example this one: http://www.viksoe.dk/code/u2lwin32.htm provides a function LoginName which will return currently logged user. There are other UFLs which support similar functionality, check if your company is already using something . This one is free. You need to register the UFL on each system which will run the report . Once registered the available functions will become available for formulas.
I personally prefer the viewer solution because it is more flexible and will cover other scenarios too. However if you need just the username UFL will be a better approach.
It depends on how the accounts are associated to the user. If there is a link, you can simply create a user parameter that asks for the user name. Then in the record select of the report you only pull accounts that match the user name in the parameter. So, for example your parameter is called
{?userName}
. In the Record Select the formula would something like{Accounts.Salesman} = {?userName}
, where {Accounts.Salesman} would be the field that links the user with the account.