Articles in this section
Category / Section

Create a Timeline Chart Using Tablix in Bold Reports

Published:
Updated:

Creating a visual timeline chart is a common requirement in project management and reporting scenarios such as tracking tasks and schedules. In Bold Reports, you can represent task durations using a Tablix report item by plotting start and end dates and applying color coding for clear visual distinction.

This guide walks you through building a dynamic timeline chart in Bold Reports using a Tablix to visualize project tasks across a date range.

Prerequisites

Before you begin, ensure you have:

  • Bold Reports Designer (Web or Desktop) version 7.x or later.
  • Access to a SQL Server database to host the task data.
  • Basic knowledge of RDL (Report Definition Language) expressions.

Step-by-Step Instructions

1. Create the dataset to plot the timeline

Create a dataset that expands task date ranges into individual days. This enables the Tablix report item to group data by specific dates.

  1. Create a table named HousingWork and populate it with sample data using the following SQL script:
    CREATE TABLE dbo.HousingWork (
        TaskName NVARCHAR(100),
        StartDate DATE,
        EndDate DATE
    );
    
    INSERT INTO dbo.HousingWork (TaskName, StartDate, EndDate)
    VALUES
        ('Electrical & Plumbing', '2024-04-01', '2024-04-05'),
        ('Flooring', '2024-04-06', '2024-04-08'),
        ('Painting', '2024-04-09', '2024-04-12'),
        ('Landscaping', '2024-04-13', '2024-04-15'),
        ('Interior Setup', '2024-04-16', '2024-04-18'),
        ('Final Inspection', '2024-04-19', '2024-04-21'),
        ('Cleanup & Handover', '2024-04-22', '2024-04-24');
    
  2. Create a new dataset in Bold Reports using the following query to generate the expanded timeline:
    WITH DateRange AS (
       SELECT 
           MIN(StartDate) AS MinDate,
           MAX(EndDate) AS MaxDate
       FROM HousingWork
    ),
    Calendar AS (
       SELECT CAST((SELECT MinDate FROM DateRange) AS DATE) AS TimelineDate
       UNION ALL
       SELECT DATEADD(DAY, 1, TimelineDate)
       FROM Calendar
       WHERE TimelineDate < (SELECT MaxDate FROM DateRange)
    ),
    Expanded AS (
       SELECT 
           c.TimelineDate,
           t.TaskName
       FROM Calendar c
       JOIN HousingWork t
           ON c.TimelineDate BETWEEN t.StartDate AND t.EndDate
    )
    SELECT *
    FROM Expanded
    ORDER BY TimelineDate, TaskName
    OPTION (MAXRECURSION 0);
    

2. Add the tablix report item to the design canvas

  1. Drag a Tablix report item onto the design canvas.
  2. Remove the default row and column group headers, leaving only two rows.
  3. Bind the Tablix to the dataset created in Step 1.
  4. Designate the top cell for the timeline date and the bottom cell for the task visualization.

Initial Tablix setup on canvas

3. Configure grouping

  1. Right-click the Tablix cell, select Column Group, and then select Parent Group.
    Add column parent group
  2. Set the group expression to =Fields!TimelineDate.Value and enable the Add header option.
    Group by TimelineDate
  3. In the Grouping Panel, click the dropdown for the Details row group and select Delete Group.
  4. In the confirmation dialog, choose Delete group only to keep the row in the Tablix.
    Delete row group

4. Configure the background color

  1. Select the detail cell in the Tablix.
  2. In the Properties Panel, under Appearance, locate Background Color.
  3. Select the expression icon to open the expression editor.
    Open expression editor for background color
  4. Enter the following expression to apply color coding:
    =Switch(
      Fields!TaskName.Value = "Electrical & Plumbing", "Blue",
      Fields!TaskName.Value = "Flooring", "Green",
      Fields!TaskName.Value = "Painting", "Yellow",
      Fields!TaskName.Value = "Landscaping", "Orange",
      Fields!TaskName.Value = "Interior Setup", "Red",
      Fields!TaskName.Value = "Final Inspection", "Purple",
      Fields!TaskName.Value = "Cleanup & Handover", "Gray",
      True, "Transparent"
    )
    

5. Add interactivity using tooltips

  1. Select the detail cell.
  2. In the Properties panel, find the Tooltip property under the Miscellaneous section.
  3. Set the value to =Fields!TaskName.Value.
    Set tooltip expression

6. Format the timeline dates

  1. Select the header cell that is grouped by date.
  2. In the Properties panel, locate the Format property.
  3. Click the expression icon and enter:
    =Format(Fields!TimelineDate.Value, "MMM d")
    

Format date expression

7. Preview the report

  1. Click Preview in the toolbar.
  2. Verify that the report displays a horizontal timeline where each day appears as a column and tasks appear as color-coded blocks.
    Final timeline chart preview

Related articles

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied