diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index b71d1a5..d9bb792 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -365,8 +365,9 @@ void ReportRender::renderBand(BandDesignIntf *patternBand, ReportRender::DataRen if (percentmaxScalePercent()){ percent += 2; bandClone->setScale((100-percent)/100); - bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]); - registerBand(bandClone); + BandDesignIntf* upperPart = dynamic_cast(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn])); + registerBand(upperPart); + delete bandClone; } } else { @@ -381,8 +382,9 @@ void ReportRender::renderBand(BandDesignIntf *patternBand, ReportRender::DataRen startNewPage(); } if (!registerBand(bandClone)) { - bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]); - registerBand(bandClone); + BandDesignIntf* upperPart = dynamic_cast(bandClone->cloneUpperPart(m_maxHeightByColumn[m_currentColumn])); + registerBand(upperPart); + delete bandClone; }; } else { bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]);