Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Fix crash if report data source is an empty collection and sum() is used #536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ public override void BuildExportList()
void BuildDetail()
{
CurrentSection = ReportModel.DetailSection;
if(DataSourceContainsData()) {
CurrentLocation = DetailStart;
var converter = new ContainerConverter(DetailStart);
if (IsGrouped()) {
BuildGroupedDetails(converter,DetailStart);
} else {
BuildSortedDetails(converter,DetailStart);
}
CurrentLocation = DetailStart;
var converter = new ContainerConverter(DetailStart);
if (IsGrouped()) {
BuildGroupedDetails(converter,DetailStart);
} else {
BuildSortedDetails(converter,DetailStart);
}
}

Expand Down Expand Up @@ -194,17 +192,7 @@ List<IExportColumn> FillAndConvert(ExportContainer parent, object current, List<

void CreateDataSource(){
DataSource = new CollectionDataSource(List, ReportModel.ReportSettings);
if (DataSourceContainsData()) {
DataSource.Bind();
}
}


bool DataSourceContainsData () {
if (DataSource.Count > 0) {
return true;
}
return false;
DataSource.Bind();
}


Expand Down