diff --git a/limereport/bands/lrsubdetailband.h b/limereport/bands/lrsubdetailband.h index 7c16d51..72967b3 100644 --- a/limereport/bands/lrsubdetailband.h +++ b/limereport/bands/lrsubdetailband.h @@ -46,6 +46,7 @@ class SubDetailBand : public DataBandDesignIntf public: SubDetailBand(QObject* owner = 0, QGraphicsItem* parent=0); bool isUnique() const {return false;} + int bandNestingLevel(){ return 1;} bool isHasHeader() const; bool isHasFooter() const; private: @@ -64,6 +65,7 @@ public: SubDetailHeaderBand(QObject* owner = 0, QGraphicsItem* parent=0); bool isUnique() const; bool isHeader() const {return true;} + int bandNestingLevel(){ return 1;} protected: QColor bandColor() const; private: @@ -80,6 +82,7 @@ public: SubDetailFooterBand(QObject* owner = 0, QGraphicsItem* parent=0); virtual bool isUnique() const; bool isFooter() const{return true;} + int bandNestingLevel(){ return 1;} protected: QColor bandColor() const; private: diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index 1e60a13..5b71de3 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -168,6 +168,7 @@ public: virtual bool isHeader() const {return false;} virtual bool isGroupHeader() const {return false;} virtual bool isData() const {return false;} + virtual int bandNestingLevel(){return 0;} bool isBand(){return true;} void setTryToKeepTogether(bool value); diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index 3992408..fe211a7 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -880,7 +880,8 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren) } } - if ( (band->columnsCount()>1) && !band->isHeader()){ + if ( (band->columnsCount()>1) && + (!band->isHeader() || (band->bandNestingLevel()>0 && band->columnsFillDirection() != BandDesignIntf::Horizontal ))){ if (m_maxHeightByColumn.size()!=band->columnsCount()){ for(int i=1;icolumnsCount();++i){ @@ -908,7 +909,8 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren) m_maxHeightByColumn[m_currentColumn]-=band->height(); } - if (band->isHeader() && band->columnsCount()>1){ + if ( (band->columnsCount()>1) && + (band->isHeader() && (band->bandNestingLevel()==0 || band->columnsFillDirection()==BandDesignIntf::Horizontal))){ qreal bandPos = m_currentStartDataPos[m_currentColumn]; m_currentStartDataPos[m_currentColumn]+=band->height();