Create an RDLC report using business object data source
To create an RDLC report for the Bold Reports® ASP.NET Core Report Viewer, build a business object class in a Visual Studio class library, then add a report with the Report Wizard and select that class as the data source.
Prerequisites
- Microsoft Visual Studio 2022 or higher
- Microsoft RDLC Report Designer
If you use a Microsoft Visual Studio version lower than 2017, update SSDT with the Business Intelligence templates. Refer to Download SQL Server Data Tools.
How do I create the business object class?
To create the business object class for an RDLC report in the Bold Reports® ASP.NET Core Report Viewer, add a class with the report fields to a Class Library (.NET Framework) project in Visual Studio.
- Open Visual Studio from the File menu and select Create a new project.
- Create project with Class Library(.NET Framework) type from the project type list.
3. Create the class with the necessary properties. Use the following code as a reference.
```csharp
public class ProductSales
{
public string ProdCat { get; set; }
public string SubCat { get; set; }
public string OrderYear { get; set; }
public string OrderQty { get; set; }
public double Sales { get; set; }
}
```- Clean and build the application.
How do I add an RDLC report in Visual Studio?
To add an RDLC report in Visual Studio, use the Report Wizard item, which starts report creation with dataset selection.
- Right-click the project and click Add > New Item.
- Search Report with new item and select
Report Wizardto start the report creation with dataset selection. - Click Add.

Data source and table configuration wizard
- Choose
objecttype from the Data Source Configuration wizard and click Next.

- Expand the tree view and select
ProductSales, and then click Finish.

- In the DataSet Properties wizard, specify the dataset name as
SalesData.

- Drag the fields into Values, Row, and Column groups, and then click Next.

- Choose the table layout and click Next.
- Select table style and click Finish.

Visual Studio now displays the RDLC report design, as in the following image:

To render the RDLC report in the Bold Reports® ASP.NET Core Report Viewer, refer to the RDLC report section.