Design an SSRS RDL report using barcode in Bold Reports®

You design a Product Details report with barcodes in the Bold Reports® Web Report Designer by creating a dataset and adding a barcode to an SSRS table report item.

How do I create the dataset?

The Product Details report in the Bold Reports® Web Report Designer needs a dataset bound to the table data region to present data in table format. This example uses the following dataset query.

SELECT TOP 100 [Order Details].ProductID, Products.ProductName, [Order Details].Quantity, [Order Details].UnitPrice, [Order Details].Discount
FROM [Order Details] INNER JOIN
Products ON [Order Details].ProductID = Products.ProductID

Refer to the Create Data section and create the dataset using the above query. This example uses the Northwind database.

How do I add a table to the report?

You add a table to the report by dragging the table report item from the item panel of the Web Report Designer.

  1. Drag the table report item from the item panel and drop it into the design area. Drag and drop tablix report item into design area
  2. Assign data to the table using the Dataset property in the table properties. Drag and drop tablix report item into design area

How do I configure the table?

You configure the table by adding column headers and assigning the product details data fields in the Web Report Designer.

  1. Add the required table column headers to the table, as shown in the following image. Drag and drop tablix report item into design area

  2. Assign the required product details data fields in the Details group row of the table cell. Drag and drop tablix report item into design area

    The following expressions are used in the UnitPrice and Total Price cells of the table.

    • =FormatCurrency(FormatNumber(Fields!UnitPrice.Value,2))
    • =FormatCurrency(FormatNumber(Fields!Quantity.Value * Fields!UnitPrice.Value,2))

How do I add the barcode report item?

The barcode report item in Bold Reports® presents the product ID in the empty Product ID cell of the table design above. Add it inside a rectangle with the following steps.

  1. Drag a rectangle item and drop it into the Product ID column cell. Drag and drop tablix report item into design area
  2. Drag the barcode report item and drop it into the Product ID column cell. Drag and drop tablix report item into design area
  3. Check the cell. The barcode report item is placed inside the rectangle. Drag and drop tablix report item into design area

If you add the barcode directly into a table cell, the report item fills the whole cell. So, the rectangle report item is used as a container.

How do I encode a value in the barcode?

You encode a value in the barcode by setting the Text property of the barcode report item to a field expression.

  1. Select the barcode report item and open the properties panel. Drag and drop tablix report item into design area
  2. Open the expression menu in the Text property under the Basic Settings category. Drag and drop tablix report item into design area
  3. In the Expression Builder, assign the =Fields!ProductID.Value field value and click Ok. Drag and drop tablix report item into design area

The Product ID of each product is now encoded in the barcode report item on report export.

How do I customize the barcode appearance?

You customize the barcode report item with its position and appearance properties in the Web Report Designer properties panel.

Drag and drop tablix report item into design area

How do I format the table?

You format the table with the background and font properties in the Web Report Designer properties panel.

  1. Select the first row, and set the background and font properties in the properties panel. Drag and drop tablix report item into design area
  2. Resize the table to the required size for better report design. Drag and drop tablix report item into design area

How do I add a report header?

You add a report title by enabling the report Header in the Web Report Designer and placing a textbox in it.

  1. Enable the report Header to add a title to the report. Enable header tag

    Refer to the Show or hide header and footer section to add or remove the header or footer in the report.

  2. Add a rectangle report item in the report header area and a textbox within the rectangle. Add report items in header area
  3. Set the report title text in the textbox. Customize the appearance of the title using the textbox and rectangle properties in the properties panel as required. Report title text

What does the final design look like?

The final design of the Bold Reports® Product Details report looks like the following image.

Product Details report design

What does the report preview look like?

On report preview, the Bold Reports® Report Viewer displays the product details report as shown below.

Product Details report preview

Download the Product Details barcode report design

Frequently asked questions

Why place the barcode inside a rectangle?

If you add the barcode directly into a table cell in the Bold Reports® Web Report Designer, the report item fills the whole cell. The rectangle acts as a container.

Which property sets the value that the barcode encodes?

The Text property under the Basic Settings category sets the encoded value, for example =Fields!ProductID.Value.

See also