Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 9  RENDERING REPORTS FROM .NET APPLICATIONS


Designing the Report


To design the report, follow these steps:


  1. To add a report to the project, right-click the project name—SSRS Viewer
    RVC—in the Solution Explorer.

  2. On the shortcut menu, select Add ➤ New Item. This opens the Add New Item
    dialog box.

  3. Select the Reporting section on the list to the left, then click the Report icon,
    enter EmployeePay.rdlc for the file name, and then click Add. This launches
    the Report Designer functionality in Visual Studio. The .rdlc extension signifies
    that it is a report for client or local rendering.

  4. Make sure the report is selected. Open the Toolbox. From the Toolbox, drag a
    Table report item onto the report.

  5. You should now be presented with the Dataset Properties window. From this
    window, select the Employees option in the Data Source drop down list. You
    will see the fields from this data source populated in the Fields data grid to the
    right. Name this dataset Employees_EmployeePay and click OK.

  6. You should now see the table in your report designer. In the Data row of the
    first column, click the field icon in the top right hand corner to select a field. In
    the first column select the Employee ID field.

  7. Perform this task again for the second and third columns. Choose StartDate
    and Amount for the second and third column, respectively.

  8. Add a textbox to the top of the report and use the text “Employee Pay Report”
    for the value.


You should now have a report that looks like Figure 9-5.
Free download pdf