How to use a list as data source for report in FastReport.Core

I'm trying to use a list for the data source in my FastReport.Core report.

My c# looks something like this;
var list = new List<ReportData>();

report.RegisterData(list, "Data");

report.Prepare();

However, i get the following exception when i call prepare;

"Error CS0012: The type 'CollectionBase' is defined in an assembly that is not referenced.
You must add a reference to assembly 'System.Collections.NonGeneric, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
etc..."

What am I doing wrong here?

Comments

  • edited 2:19AM
    should be no problem with generic list...

    List<MatrixDemo> matrixDemo = new List<MatrixDemo>();
    report.RegisterData(matrixDemo, "MatrixDemo", maxNestingLevel: 1);

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.