Crystal Reports database connection to .csv file dependent on logged on username

Posted on 2014-08-20
Last Modified: 2014-08-26
I am going to create a .csv file and put it into a user directory on network.  Any file in that directory is for that specific user.  The directory name will reflect their network logon name.

Question is - can I setup one crystal report which will detect the current logged on name and pull the .csv file from the directory that matches the current logged on user?
Question by:maverick0728
    LVL 18

    Accepted Solution

    No , you can't!

    You can create a database with 1 table and put the records for all users in this table. Add also a field UserName and put the user connected to each record. When you create your report you can get the currently logged user, either using a viewer or UFL and include it in the Record Selection formula. The result will be the report will show different set of data for each user. Here is a sample video showing how to pass the user name to the report using a viewer:
    The viewer is R-Tag ( and the free version will be able to handle this.
    Here is also a link to a free UFL, which can be used to get the current user name :
    LVL 100

    Assisted Solution

    As I read this, you want to change the data source based on the user's name.

    You can't do that in the report.  You will have to build an application to get the user's name and change the report data source to the correct CSV or use a third-party tool that can change the data source.

    There is a good list of viewer and schedulers on Ken Hamady's website

    Ken does an annual evaluation of the viewers and has his review linked to his page.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now