Using split function on custom datasource


I'm setting report datasource in code using report.AddTable(...) method.

Datasource is list of object which class is like:

public class SomeClass
  public List<ClassTwo> ClassTwoList { get; set; }

In your online tutorial, you're using DataSet as datasource, and in config sheet you're splitting Product table to create new ProductMaster table; Split(Product;5).

Is it possible to do something like that with my ClassTwoList?

I'm using 'I_ClassTwoList_I' band, and I need it to go in next line after fixed number of cells.
Or maybe, there is a way to make it go to next line automatically when it reach page margin?


Marin Mašić


Is this a master detail report?   For a simple report, it works exactly the same way as with datasets.
You would define a new dataset  ClasTwoMaster = Split(ClassTwoList; 40) in the config sheet, and then use a ClassTwoListMaster range to go down.

Going to next line automatically when reaching the page margin is not possible, mainly because the page margin changes depending on the printer or paper size, and FlexCel doesn't know how you will like to print it when it is creating the file.

I can't do that because ClassTwoList isn't added with AddTable method.


List<SomeClass> someClassList = Helper.GetSomeClassList(parameter);
report.AddTable("SomeClassList", someClassList);

And each SomeClass object in someClassList have its own ClassTwoList.

You are right, this won't work if ClassTwoList is a detail of SomeClass (that's why I asked if it was a master detail report).

Sadly right now there isn't a way to do this in a detail class, because the config sheet won't find it. But I will see if this can be added (maybe with a syntax like "Split(someClassList.ClassTwoList)"  )

I'll let you know if that is possible.