mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 04:54:40 +03:00
Printing subdetail footer has been fixed
This commit is contained in:
parent
43a62bdb7f
commit
166b18be49
@ -140,7 +140,8 @@ qreal ReportRender::maxColumnHeight()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReportRender::ReportRender(QObject *parent)
|
ReportRender::ReportRender(QObject *parent)
|
||||||
:QObject(parent), m_renderPageItem(0), m_pageCount(0), m_currentColumn(0)
|
:QObject(parent), m_renderPageItem(0), m_pageCount(0), m_currentColumn(0),
|
||||||
|
m_lastDataBand(0), m_lastRenderedFooter(0)
|
||||||
{
|
{
|
||||||
initColumns();
|
initColumns();
|
||||||
}
|
}
|
||||||
@ -295,6 +296,9 @@ void ReportRender::renderBand(BandDesignIntf *patternBand, ReportRender::DataRen
|
|||||||
startNewPage();
|
startNewPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (patternBand->isFooter())
|
||||||
|
m_lastRenderedFooter = patternBand;
|
||||||
|
|
||||||
BandDesignIntf* bandClone=renderData(patternBand);
|
BandDesignIntf* bandClone=renderData(patternBand);
|
||||||
patternBand->emitBandRendered(bandClone);
|
patternBand->emitBandRendered(bandClone);
|
||||||
|
|
||||||
@ -348,6 +352,7 @@ void ReportRender::renderBand(BandDesignIntf *patternBand, ReportRender::DataRen
|
|||||||
void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
||||||
{
|
{
|
||||||
IDataSource* bandDatasource = 0;
|
IDataSource* bandDatasource = 0;
|
||||||
|
m_lastRenderedFooter = 0;
|
||||||
if (dataBand && !dataBand->datasourceName().isEmpty())
|
if (dataBand && !dataBand->datasourceName().isEmpty())
|
||||||
bandDatasource = datasources()->dataSource(dataBand->datasourceName());
|
bandDatasource = datasources()->dataSource(dataBand->datasourceName());
|
||||||
|
|
||||||
@ -399,8 +404,10 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_reprintableBands.removeOne(dataBand->bandHeader());
|
m_reprintableBands.removeOne(dataBand->bandHeader());
|
||||||
renderBand(dataBand->bandFooter(),StartNewPageAsNeeded);
|
|
||||||
renderGroupFooter(dataBand);
|
renderGroupFooter(dataBand);
|
||||||
|
|
||||||
|
renderBand(dataBand->bandFooter(),StartNewPageAsNeeded);
|
||||||
datasources()->deleteVariable(varName);
|
datasources()->deleteVariable(varName);
|
||||||
} else if (bandDatasource==0) {
|
} else if (bandDatasource==0) {
|
||||||
renderBand(dataBand,StartNewPageAsNeeded);
|
renderBand(dataBand,StartNewPageAsNeeded);
|
||||||
@ -469,7 +476,9 @@ void ReportRender::renderChildFooter(BandDesignIntf *parent, BandPrintMode print
|
|||||||
if (band->metaObject()->indexOfProperty("printAlways")>0){
|
if (band->metaObject()->indexOfProperty("printAlways")>0){
|
||||||
printAlways=band->property("printAlways").toBool();
|
printAlways=band->property("printAlways").toBool();
|
||||||
}
|
}
|
||||||
if (printAlways == (printMode==PrintAlwaysPrintable)) renderBand(band,StartNewPageAsNeeded);
|
|
||||||
|
if ( (band != m_lastRenderedFooter) && (printAlways == (printMode == PrintAlwaysPrintable)) )
|
||||||
|
renderBand(band,StartNewPageAsNeeded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +162,7 @@ private:
|
|||||||
qreal m_reportFooterHeight;
|
qreal m_reportFooterHeight;
|
||||||
int m_renderedDataBandCount;
|
int m_renderedDataBandCount;
|
||||||
BandDesignIntf* m_lastDataBand;
|
BandDesignIntf* m_lastDataBand;
|
||||||
|
BandDesignIntf* m_lastRenderedFooter;
|
||||||
bool m_renderCanceled;
|
bool m_renderCanceled;
|
||||||
QVector<qreal> m_maxHeightByColumn;
|
QVector<qreal> m_maxHeightByColumn;
|
||||||
QVector<qreal> m_currentStartDataPos;
|
QVector<qreal> m_currentStartDataPos;
|
||||||
|
Loading…
Reference in New Issue
Block a user