Bold Reports FAQ

Find answers for the most frequently asked questions

⮜ Back

How to pass JSON data in the Bold Reports Report Viewer and Report Writer

You have to Convert the objects from JSON data as shown in the following code example.

string json = System.IO.File.ReadAllText(@"<App Location>\App_Data\categories.json");
Categories Categories = JsonConvert.DeserializeObject<Categories>(json);

writer.DataSources.Add(new ReportDataSource( Name = "Categories", Value = Categories.ToList()));

public class Categories : List<Category>


public class Category
  public int CategoryID { get; set; }
  public string Description { get; set; }
  public string Name { get; set; }

You can refer the following documentation for passing the business object data for RDLC report in the Report Viewer and Report Writer.

Report Viewer

JavaScript Report Viewer

ASP.NET WebForms Report Viewer

ASP.NET MVC Report Viewer

ASP.NET Core Report Viewer

Report Writer

ASP.NET Core Report Writer