Results 1 to 6 of 6

Thread: Server generates report when user connects

  1. #1
    Join Date
    Nov 2009
    Posts
    333

    Server generates report when user connects

    Hello,
    I use Reporting Services included in SQL Server 2005. I would like to make specific reports to each user who connects to the report server. It is a common example, every business that connects to see his work and his alone. Therefore I come to retrieve the credentials of the logged on user (Windows authentication method), and I pass the logon parameter in my query to filter. But I do not see at all how? Thank you.
    Last edited by Linux-Us; 08-01-2010 at 02:24 PM.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Generate report when user connects

    Hello,
    I would like to make specific reports to each user who connects to the report server. It is a common example, every business that connects to see his work and his alone.
    I think you can not retrieve the username of the windows session or switch element as a parameter to your report.
    For both administrator and the user. I question I have for you, what will you do with the generated reports, that is what is the use of the reports for the user's connecting the server.
    Last edited by Zecho; 08-01-2010 at 02:08 PM.

  3. #3
    Join Date
    Nov 2009
    Posts
    333

    Re: Generate report when user connects

    Hi,
    I know how to declare it in Visual Studio, a parameter and integrate it in a query, but I do not see how to retrieve the name of the Windows user and integrated into the application. Thanks for your reply.
    I question I have for you, what will you do with the generated reports, that is what is the use of the reports for the user's connecting the server.
    I want this because I want to keep a track on the users work. So, I think concept like this or similar to this will help me.
    Last edited by Linux-Us; 08-01-2010 at 02:13 PM.

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: Server generates report when user connects

    Hello,
    Property System.Environment.UserName enables you to retrieve the name of the user. Then just as you create a parameter of type string in your report and in it "calls", you pass the user previously recovered. Hope this method helps you. Just try this method and then if you have any problem then do post back.

  5. #5
    Join Date
    Nov 2009
    Posts
    333

    Re: Server generates report when user connects

    Hi
    OK, it works, thank you!
    EDIT: there is also another way to retrieve the logon user login:
    Code:
    User UserID
    I prefer this method because the value returned by this field there is the domain name, which suits me.
    So the method for those who have not integrated whole:
    - Create a report parameter of type String, and check "Hidden".
    - In Default Values, check "Non-queried" and put "user =" UserID "in field
    - In the dataset query, filter using this setting:
    Code:
    WHERE usrLogon = @ loginreport

  6. #6
    Join Date
    May 2008
    Posts
    2,297

    Re: Server generates report when user connects

    Hello,
    In my report if I put System.Environment.UserName get an error when generating the report.
    Error while processing the report parameter "Usern. (rsReportParameterProcessingError)
    in deferring to the user parameter set default value = System.Environment.UserName.
    What is strange is that his works very well in the overview report. But not once deployed. If I put User! UserID its course but I have the username and domain name. How do I get only the user name without the domain name before. Thank you.

Similar Threads

  1. SCOM Server Restart Report
    By kingbob2011 in forum Windows Software
    Replies: 1
    Last Post: 23-06-2011, 12:25 AM
  2. Windows 7 VPN Connects but wont show computers on network it connects too
    By Altair Creed in forum Networking & Security
    Replies: 4
    Last Post: 06-04-2010, 01:38 AM
  3. How to create a Report Server Project in SQL 2005
    By Shreevats in forum Windows Software
    Replies: 5
    Last Post: 22-03-2010, 12:02 PM
  4. Installing SQL Report Server 2005 on Server 2008
    By Marcos Benites in forum Windows Server Help
    Replies: 1
    Last Post: 25-04-2008, 05:54 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,029,080.79196 seconds with 16 queries