Live Chat Icon For mobile
Live Chat Icon

Creating List Reports Using Bold Reports Designer

A list data-region can be used to create a free-form layout report. Like a table and a matrix, a list data-region is not restricted to a grid layout. It acts as a container for the placement of multiple report items side by side so that you can easily design business reports such as an invoice, a mail-merge, and a form.

In this blog post, we are going to create a list report to display employee details in a mail-merge format. First, launch the Bold Reports On-Premise server demo site, refer to the steps to create a report, and create a new report.

New report
New report

Create data set

To feed data to the list data-region, I used the Employees details from the sample JSON data and transformed that JSON data into rows and columns using a SQL query.

  1. In the data panel, click New Data.

    Data connection panel
    Data Connection Panel
  2. Choose the SQL connection type.

    Supported connection types
    Supported Connection Types
  3. As mentioned earlier, we are going to create a data set by transforming JSON data. So, you can provide credentials and connect with any of your server databases.

    New data source connection panel
    Supported Connection Types
  4. In the query builder, switch to query mode. Refer to Microsoft’s documentation to write the SQL query to transform the JSON data into rows and columns.

    Query builder
    Query Builder
  5. Now, click Finish.

Refer to the query builder overview blog post and data set creation documentation, and create the data set in a report. You can download the report that contains the previous data set from https://www.boldreports.com/wp-content/uploads/2020/05/Employee-Records.zip

Add a list to the report

The list report item is displayed in the item panel under Data Regions.

List report item in item panel
List Report Item in Item Panel

Drag the list report item to the design area from the item panel.

Add list to design surface
Add List to Design Surface

Once you drop the list item, it renders as a row and a column in the design surface. Its properties are listed in the properties panel.

List structure with its properties
List Structure with Properties

Assign a data set

To assign a data set, select the list report item and set the data set name to the Dataset property in the properties panel.

Assign data set
Assign Data Set

Displaying records in the list

Let’s display employee details in the list surface using images, rectangles, and text boxes. You can drag and drop the report item or right-click inside the list surface to use a menu to insert the items.

First, add two rectangle report items inside the list to display employee images and personal details side by side. Resize the list report item width and height to the required size.

Assign data set
Adding a Rectangle to the List Surface

Then, drag and drop an image item in the left rectangle to display the employee image in the report.

Assign data set
Adding an Image to the List Surface

To display the employee image from the database in an image report item, bind the Photo field from the database to an image item. Refer to the image report item documentation to understand the steps involved in assigning data to an image report item.

Assign data set
Assigning Image Source

Now, let’s place other information from the data set—like employee name, birth date, address, etc.—onto the list surface.

Insert a text box into the right side rectangle and enter “Name.” Resize the text box to the dimensions you want.

Assign data set
Adding a Field to the List

Drag the FullName field from the data set into the list surface.

Assign data set
Adding a Text Box to a List

Similarly, add the data fields (Title, Birth Date, Notes, Country, City, Address, and HomePhone) and labels for each data field using text boxes in the list data-region surface.

Assign data set
List Displaying Employee Details

To display employee addresses, I clubbed the Country, City, and Address fields in a single text box using the expression builder. Refer to the Bold Reports documentation article “Display dynamic text using expression” to display multiple data fields in a text box.

Formatting list appearance

Add formatting to improve the look and feel of the report. First, let’s apply formatting to the labels.

On the list surface, select the text boxes that display label text and open the properties panel.

Selecting Report Items
Selecting Report Items
  1. Under Basic Settings, change font family to Segoe UI, font color to White, font size to 11, and font style to Bold.

    Set Font Properties
    Set Font Properties
  2. Under Alignment, change the Text Alignment to Left and Vertical Alignment to Middle.

    Assign data set
    Setting Alignment Properties
  3. Under Appearance, change the Background Color to #6d8c59.

    Setting Appearance Properties
    Setting Appearance Properties

Similarly, apply formatting for text boxes that display data fields.

Assign data set
Formatted List Surface

Select the list cell and set Border as None.

Assign data set
Setting List Cell Properties

Refer to the list data-region documentation to learn more about list data-region properties.

Adding report headers

Add a header and remove the footer from the report design by referring to the documentation article “Show or Hide Header and Footer.”

Assign data set
Enabling Report Header

Insert a rectangle and a text box within the header area. Adjust the width and height as required.

Assign data set
Adding Report Header

Set the report title in the text box and customize its appearance by using the text box and rectangle properties in the properties panel.

Design View: Employee Record in Mail Merge Format
Design View: Employee Record in Mail Merge Format

Preview report

You can preview the report using the built-in Report Viewer. The list data-region displays employee records in a mail merge format.

Preview: Employee Records in Mail-Merge Format
Preview: Employee Records in Mail-Merge Format

Conclusion

I hope this blog provided a basic knowledge about list data region and how to create a report using it in Bold Reports Designer. To explore further, go through our sample reports and Bold Reports documentation. I have also attached the generated .rdl file for further reference.

If you have any questions, please post them in the comments section. You can also contact us through our contact page or, if you already have an account, you can log in to submit your support question.

Bold Reports now comes with a 15-day free trial with no credit card information required. We welcome you to start a free trial and experience Bold Reports for yourself. Give it a try and let us know what you think!

Stay tuned to our official TwitterFacebookLinkedInPinterest, and Instagram pages for announcements about upcoming releases.

Leave a Reply