There is a method in fastreport called RegisterData that creates initial datasource and bind data to it.
So, I found a report that is already working in project, but when I'm trying to do the same thing I don't see any datasources in it.
var data = GetData(parameters) as IEnumerable<Days>;
Report.RegisterData(data, "DaysBS", 4)
When I try to select data source from design mode I can't see any? Who knows why? In already excisting report all works fine and I can see all registered datasources
Report.RegisterData(data, "UnUsedPeriodsBS", 4);
var vacationUnUsedPeriodDatas = data.SelectMany(d => d.Periods).ToList();
Report.RegisterData(vacationUnUsedPeriodDatas, "PeriodDetailsBS", 4);
Report.RegisterData(vacationUnUsedPeriodDatas.SelectMany(s => s.PeriodDetails).ToList(), "DaysDetailsBS", 4);
EDIT
Tried to manually refer to DaysBS in report design mode and it's working, but I can't understand why I can't see any report data from design mode
but I can't understand why I can't see any report data from design mode
Try to set tables from your dataset enabled:
Report.GetDataSource("tableName").Enabled = true;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With