New to Telerik Reporting? Download free 30-day trial

Creating the Table and Populating it with Data

This article is part of the Demo report guide on getting started with Telerik Reporting and demonstrates how to add an SqlDataSource component and present the fetched data into a table item.

Adding the SqlDatasource Component

This guide uses the AdventureWorks database that is provided by Telerik Reporting. The data sources that will be added to the report will generate their data representations.

  1. Select Data > SQL Data Source > Existing data connections > local:/Telerik.reporting.Examples.CSharp.Properties.


  2. Click Next > Use as a shared connection > Next.

  3. On the screen that loads, fill in the Select Statement field with the following query. The query will extract only the first 14 employees and they will be listed in ascending order according to their id, that is, the employee with id=1 will be the first one, the employee with id=2 will come second, and so on.

    [HumanResources].[vEmployee].[EmployeeID] ,
    FROM [HumanResources].[vEmployee]
    WHERE [HumanResources].[vEmployee].[EmployeeID] <= 14
  4. From the grid with the properties, change the name of the data source to tableDataSource so you can later refer it and render its data in the report.

Creating the Table

  1. Click the datailSection.

  2. From the bar, select Insert.

  3. Select Table > Table Wizard > tableDataSource.

  4. On the screen that loads, mark all columns and drag them to the Table Columns. Click Next.

  5. From the window that opens, select a predefined style for your table.

  6. Click Next and Finish.

  7. Apply the following Styling to the table:

    • BackgroundColor and BorderColor set to be [34, 181, 115].

    • Font > Name set to be SegoeUI.

    • Mark the table header and set the Color property to be White.

  8. Add the title of the table. To do that, add a TextBox and set its Value to be "Employees".

  9. Insert two Shapes next to the text. Set the ShapeType to be Horizontal Line and make the Color to be Silver.

Previewing the Result

Preview the result by clicking Preview > PrintPreview.

  • The generated report uses the Segoe UI font.

  • The color of its table title is 0, 105, 104.

  • Shapes are used for the lines next to the table title.

  • The BorderColor of the table is 34, 181, 115.


Next Steps

Previous Steps

See Also

In this article
Not finding the help you need? Improve this article