From c3ff1ff46259051ab4a5075c1f82a10d50940599 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 30 Jun 2017 13:22:41 +0300 Subject: [PATCH] Subdetail header render has been fixed --- limereport/lrreportrender.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index ad6829b..710da8f 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -430,7 +430,6 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign if (patternBand->isFooter()) m_lastRenderedFooter = patternBand; - bandClone->setBackgroundColor( (datasources()->variable(QLatin1String("line_")+patternBand->objectName().toLower()).toInt() %2 !=0 ? bandClone->backgroundColor(): @@ -505,6 +504,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand) IDataSource* bandDatasource = 0; m_lastRenderedFooter = 0; + if (!dataBand->datasourceName().isEmpty()) bandDatasource = datasources()->dataSource(dataBand->datasourceName()); @@ -524,7 +524,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand) if (dataBand->bandHeader() && dataBand->bandHeader()->reprintOnEachPage()) m_reprintableBands.append(dataBand->bandHeader()); - renderChildHeader(dataBand,PrintNotAlwaysPrintable); + //renderChildHeader(dataBand,PrintNotAlwaysPrintable); renderGroupHeader(dataBand, bandDatasource, true); bool firstTime = true; @@ -658,7 +658,8 @@ void ReportRender::renderChildHeader(BandDesignIntf *parent, BandPrintMode print if (band->metaObject()->indexOfProperty("printAlways")>0){ printAlways=band->property("printAlways").toBool(); } - if (printAlways == (printMode==PrintAlwaysPrintable) ) renderBand(band, 0, StartNewPageAsNeeded); + if ((band != m_lastRenderedHeader) && (printAlways == (printMode == PrintAlwaysPrintable)) ) + renderBand(band, 0, StartNewPageAsNeeded); } } @@ -682,9 +683,9 @@ void ReportRender::renderChildBands(BandDesignIntf *parentBand) if (!band->datasourceName().isEmpty()) ds = m_datasources->dataSource(band->datasourceName()); if (ds) ds->first(); - renderChildHeader(band,PrintAlwaysPrintable); + //renderChildHeader(band,PrintAlwaysPrintable); renderDataBand(band); - renderChildFooter(band,PrintAlwaysPrintable); + //renderChildFooter(band,PrintAlwaysPrintable); closeFooterGroup(band); } }