From 5e8305f44ff6fdb12fd22af533a1dd50966f3dce Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 21 Jul 2017 20:35:33 +0300 Subject: [PATCH] #IS_LAST_PAGEFOOTER & #IS_FIRST_PAGEFOOTER variables have been added --- limereport/lrdatasourcemanager.cpp | 2 ++ limereport/lrreportrender.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/limereport/lrdatasourcemanager.cpp b/limereport/lrdatasourcemanager.cpp index 2358ecf..6ff7d9e 100644 --- a/limereport/lrdatasourcemanager.cpp +++ b/limereport/lrdatasourcemanager.cpp @@ -226,6 +226,8 @@ DataSourceManager::DataSourceManager(QObject *parent) : m_groupFunctionFactory.registerFunctionCreator(QLatin1String("MAX"),new ConstructorGroupFunctionCreator); setSystemVariable(QLatin1String("#PAGE"),1,FirstPass); setSystemVariable(QLatin1String("#PAGE_COUNT"),0,SecondPass); + setSystemVariable(QLatin1String("#IS_LAST_PAGEFOOTER"),false,FirstPass); + setSystemVariable(QLatin1String("#IS_FIRST_PAGEFOOTER"),false,FirstPass); m_datasourcesModel.setDataSourceManager(this); } diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp index d5787c9..1d6670b 100644 --- a/limereport/lrreportrender.cpp +++ b/limereport/lrreportrender.cpp @@ -309,6 +309,8 @@ void ReportRender::initVariables() { m_datasources->setReportVariable("#PAGE",1); m_datasources->setReportVariable("#PAGE_COUNT",0); + m_datasources->setReportVariable("#IS_LAST_PAGEFOOTER",false); + m_datasources->setReportVariable("#IS_FIRST_PAGEFOOTER",false); } #ifdef HAVE_UI_LOADER @@ -1230,6 +1232,11 @@ void ReportRender::moveTearOffBand(){ void ReportRender::savePage(bool isLast) { + + + m_datasources->setReportVariable("#IS_LAST_PAGEFOOTER",isLast); + m_datasources->setReportVariable("#IS_FISRT_PAGEFOOTER",m_datasources->variable("#PAGE").toInt()==1); + renderPageItems(m_patternPageItem); checkFooterGroup(m_lastDataBand); cutGroups();