mirror of
https://github.com/fralx/LimeReport.git
synced 2025-03-13 22:03:47 +03:00
Nested groups footers have been fixed
This commit is contained in:
parent
a7e85671df
commit
37cbc134d1
@ -717,22 +717,11 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
|||||||
if (gb&&gb->isNeedToClose(m_datasources)){
|
if (gb&&gb->isNeedToClose(m_datasources)){
|
||||||
if (band->childBands().count()>0){
|
if (band->childBands().count()>0){
|
||||||
bool didGoBack = dataSource->prior();
|
bool didGoBack = dataSource->prior();
|
||||||
foreach (BandDesignIntf* subBand, band->childrenByType(BandDesignIntf::GroupHeader)) {
|
renderGroupFooterByHeader(band);
|
||||||
foreach(BandDesignIntf* footer, subBand->childrenByType(BandDesignIntf::GroupFooter)){
|
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
|
||||||
}
|
|
||||||
closeDataGroup(subBand);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (BandDesignIntf* footer, band->childrenByType(BandDesignIntf::GroupFooter)) {
|
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (didGoBack){
|
if (didGoBack){
|
||||||
dataSource->next();
|
dataSource->next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closeDataGroup(band);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gb && !gb->isStarted()){
|
if (gb && !gb->isStarted()){
|
||||||
@ -759,12 +748,14 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ReportRender::renderGroupFooterByHeader(BandDesignIntf* groupHeader){
|
void ReportRender::renderGroupFooterByHeader(BandDesignIntf* groupHeader){
|
||||||
|
if (groupHeader->reprintOnEachPage()) m_reprintableBands.removeOne(groupHeader);
|
||||||
foreach (BandDesignIntf* header, groupHeader->childrenByType(BandDesignIntf::GroupHeader)){
|
foreach (BandDesignIntf* header, groupHeader->childrenByType(BandDesignIntf::GroupHeader)){
|
||||||
renderGroupFooterByHeader(header);
|
renderGroupFooterByHeader(header);
|
||||||
}
|
}
|
||||||
foreach (BandDesignIntf* footer, groupHeader->childrenByType(BandDesignIntf::GroupFooter)){
|
foreach (BandDesignIntf* footer, groupHeader->childrenByType(BandDesignIntf::GroupFooter)){
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
renderBand(footer, 0, StartNewPageAsNeeded);
|
||||||
}
|
}
|
||||||
|
closeDataGroup(groupHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReportRender::renderGroupFooter(BandDesignIntf *parentBand)
|
void ReportRender::renderGroupFooter(BandDesignIntf *parentBand)
|
||||||
@ -772,14 +763,7 @@ void ReportRender::renderGroupFooter(BandDesignIntf *parentBand)
|
|||||||
foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){
|
foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){
|
||||||
IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
|
IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
|
||||||
if (gb && gb->isStarted()){
|
if (gb && gb->isStarted()){
|
||||||
if (band->reprintOnEachPage()) m_reprintableBands.removeOne(band);
|
renderGroupFooterByHeader(band);
|
||||||
foreach(BandDesignIntf* header, band->childrenByType(BandDesignIntf::GroupHeader)){
|
|
||||||
renderGroupFooterByHeader(header);
|
|
||||||
}
|
|
||||||
foreach(BandDesignIntf* footer, band->childrenByType(BandDesignIntf::GroupFooter)){
|
|
||||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
|
||||||
}
|
|
||||||
closeDataGroup(band);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user