diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index e02a22f..21235fa 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -203,6 +203,9 @@ public: bool startNewPage() const; void setStartNewPage(bool startNewPage); + void setAutoHeight(bool value){m_autoHeight=value;} + bool autoHeight(){return m_autoHeight;} + signals: void bandRendered(BandDesignIntf* band); protected: @@ -211,11 +214,7 @@ protected: qreal findMaxBottom(); qreal findMaxHeight(); void trimToMaxHeight(int maxHeight); - - void setAutoHeight(bool value){m_autoHeight=value;} - bool autoHeight(){return m_autoHeight;} - - void setBandTypeText(const QString& value); + void setBandTypeText(const QString& value); QString bandTypeText(){return m_bandTypeText;} void moveDown(){} void moveUp(){} diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index 749803e..0a7f450 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -741,8 +741,10 @@ BandDesignIntf* ReportRender::sliceBand(BandDesignIntf *band, BandDesignIntf* pa while (band->height()>m_maxHeightByColumn[m_currentColumn]) { band = saveUppperPartReturnBottom(band,m_maxHeightByColumn[m_currentColumn],patternBand); if (!band->isEmpty()) { - band->setHeight(0); - band->updateItemSize(m_datasources); + if (band->autoHeight()){ + band->setHeight(0); + band->updateItemSize(m_datasources); + } DataBandDesignIntf* data = dynamic_cast(band); if (isLast && data && data->keepFooterTogether() && band->height()sliceLastRow()