From 92788d100b7ee6f447cbc4362c1ea3108e434ce1 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sun, 14 Oct 2018 00:06:27 +0300 Subject: [PATCH] Export report has been fixed --- limereport/lrreportengine.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index 4ccaf30..06fc9bc 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -491,19 +491,19 @@ bool ReportEnginePrivate::exportReport(QString exporterName, const QString &file if (fn.isEmpty()){ QString filter = QString("%1 (*.%2)").arg(e->exporterName()).arg(e->exporterFileExt()); QString fn = QFileDialog::getSaveFileName(0,tr("%1 file name").arg(e->exporterName()),"",filter); - if (!fn.isEmpty()){ - QFileInfo fi(fn); - if (fi.suffix().isEmpty()) - fn += QString(".%1").arg(e->exporterFileExt()); + } + if (!fn.isEmpty()){ + QFileInfo fi(fn); + if (fi.suffix().isEmpty()) + fn += QString(".%1").arg(e->exporterFileExt()); - bool designTime = dataManager()->designTime(); - dataManager()->setDesignTime(false); - ReportPages pages = renderToPages(); - dataManager()->setDesignTime(designTime); - bool result = e->exportPages(pages, fn, params); - delete e; - return result; - } + bool designTime = dataManager()->designTime(); + dataManager()->setDesignTime(false); + ReportPages pages = renderToPages(); + dataManager()->setDesignTime(designTime); + bool result = e->exportPages(pages, fn, params); + delete e; + return result; } } return false;