title: SQL / SSRS Adding Username to Report use table
body: <p>My scenario is as follows:</p>
  
  <p>If a user runs a report, I want to insert a row into the <code>ReportUse</code> table which has 3 fields/columns:</p>
  
  <p><code>User, date, reportname</code>.</p>
  
  <p>Currently I have an <code>Insert</code> statement at the end of the report stored procedure which is:</p>
  
  <pre><code>INSERT INTO ReportUse (date, reportname)
  SELECT GETDATE(), 'StaffReport'
  </code></pre>
  
  <p>This inserts the date and the report name, I am unsure of how to add the username to this, it would be their windows userid.</p>