mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-09 05:57:15 +03:00
Nested groups has been fixed for callback datasources (Thanks to Louis Coetzer)
This commit is contained in:
@@ -675,7 +675,7 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
||||
IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
|
||||
if (gb&&gb->isNeedToClose(m_datasources)){
|
||||
if (band->childBands().count()>0){
|
||||
dataSource->prior();
|
||||
bool didGoBack = dataSource->prior();
|
||||
foreach (BandDesignIntf* subBand, band->childrenByType(BandDesignIntf::GroupHeader)) {
|
||||
foreach(BandDesignIntf* footer, subBand->childrenByType(BandDesignIntf::GroupFooter)){
|
||||
renderBand(footer, 0);
|
||||
@@ -687,7 +687,12 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
||||
}
|
||||
|
||||
dataSource->next();
|
||||
if (didGoBack)
|
||||
{
|
||||
//New Method to undo prior... Alternatively pass in bool isUndoPrior into next()
|
||||
dataSource->undoPrior();
|
||||
//dataSource->next(); //Also emit changePos, which it should not at this point
|
||||
}
|
||||
}
|
||||
closeDataGroup(band);
|
||||
// if (gb->isNeedToStartNewPage()){
|
||||
|
Reference in New Issue
Block a user