This project is read-only.

Project Description
Create a UI to generate multiple reports from MS SQL Report Server.


This project is part of a larger application. The requirements for the application is to allow managers the ability to run reports for their employees. The managers wanted the ability to select multiple employees, which report to run and what file type to save the report (.docx or .pdf) The app must also create a folder on a network share to save the reports to. The project is written in C#.

Application workflow

  1. Bind asp:listbox with employee names from the SQL employee table
  2. Set the employee number as each listbox item value
  3. Manager selects employee(s) from listbox, the report name radiobutton and saved file type radio button.
  4. On Button click, the app performs the following steps
  5. Creates a folder on the network share with the logged in username
  6. Creates a datatable in memory for each selected employee. The columns of the table are:
    1. Report path and report name on the report server
    2. Saved file type desired (Word document or Adobe PDF)
    3. Filename for the generated report (in this case it is the employee name + Employee Number)
    4. File extension for selected saved report (.docx or .pdf)
    5. Output path to the network share to save the file
    6. Report parameter (the employee number for this application)
  7. The datatable is passed to the CVGenerator class where the code takes the datatable and runs through each row of the datatable and generates the report for each selected employee.

This app also uses the User Impersonation class created by Alex B. Clarke on http://www.codeproject.com/Articles/14358/User-Impersonation-in-NET

The impersonator class is used to create the folder on the network share and also to run and save the generated report as a Active Directory user with appropriate rights.

You must also set a web reference in your project to the reportexecution2005.asmx file located on your report server. (typical path would be http://reportservername/reportserver/reportexecution2005.asmx)

 

 

Last edited Sep 7, 2014 at 11:56 PM by jasenm, version 3