diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index ef6836f..ddf7134 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -699,14 +699,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(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); } diff --git a/limereport/lrreportrender.h b/limereport/lrreportrender.h index 16e8176..8e62b0b 100644 --- a/limereport/lrreportrender.h +++ b/limereport/lrreportrender.h @@ -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 m_columnedBandItems; unsigned long long m_curentNameIndex; - }; } // namespace LimeReport #endif // LRREPORTRENDER_H