This commit is contained in:
Arin Alexander 2017-03-06 18:46:38 +03:00
commit f0ef99b223
2 changed files with 15 additions and 3 deletions

View File

@ -726,14 +726,26 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
}
}
void ReportRender::renderGroupFooterByHeader(BandDesignIntf* groupHeader){
foreach (BandDesignIntf* header, groupHeader->childrenByType(BandDesignIntf::GroupHeader)){
renderGroupFooterByHeader(header);
}
foreach (BandDesignIntf* footer, groupHeader->childrenByType(BandDesignIntf::GroupFooter)){
renderBand(footer, 0, StartNewPageAsNeeded);
}
}
void ReportRender::renderGroupFooter(BandDesignIntf *parentBand)
{
foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){
IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
if (gb && gb->isStarted()){
if (band->reprintOnEachPage()) m_reprintableBands.removeOne(band);
if (band->childBands().count()>0){
renderBand(band->childBands().at(0), 0, StartNewPageAsNeeded);
foreach(BandDesignIntf* header, band->childrenByType(BandDesignIntf::GroupHeader)){
renderGroupFooterByHeader(header);
}
foreach(BandDesignIntf* footer, band->childrenByType(BandDesignIntf::GroupFooter)){
renderBand(footer, 0, StartNewPageAsNeeded);
}
closeDataGroup(band);
}

View File

@ -151,6 +151,7 @@ private:
qreal columnHeigth(int columnIndex);
qreal maxColumnHeight();
void renameChildItems(BaseDesignIntf *item);
void renderGroupFooterByHeader(BandDesignIntf *groupHeader);
private:
DataSourceManager* m_datasources;
ScriptEngineContext* m_scriptEngineContext;
@ -183,7 +184,6 @@ private:
QVector<BandDesignIntf*> m_columnedBandItems;
unsigned long long m_curentNameIndex;
};
} // namespace LimeReport
#endif // LRREPORTRENDER_H