diff --git a/src/plugins/reports/KexiDBReportDataSource.cpp b/src/plugins/reports/KexiDBReportDataSource.cpp --- a/src/plugins/reports/KexiDBReportDataSource.cpp +++ b/src/plugins/reports/KexiDBReportDataSource.cpp @@ -19,6 +19,8 @@ #include "KexiDBReportDataSource.h" #include "kexireportpart.h" +#include +#include #include #include @@ -49,6 +51,7 @@ KDbQuerySchema *originalSchema; KDbQuerySchema *copySchema; KDbEscapedString schemaSql; + QList currentParams; }; KexiDBReportDataSource::KexiDBReportDataSource(const QString &objectName, const QString &pluginId, @@ -122,7 +125,8 @@ { //qDebug() << "Opening cursor.." // << KDbConnectionAndQuerySchema(d->tempData->connection(), *d->copySchema); - d->cursor = d->tempData->connection()->executeQuery(d->copySchema, KDbCursor::Option::Buffered); + + d->cursor = d->tempData->connection()->executeQuery(d->copySchema, d->currentParams, KDbCursor::Option::Buffered); } @@ -171,6 +175,13 @@ //qDebug() << d->objectName << "is a query.."; //qDebug() << KDbConnectionAndQuerySchema(d->tempData->connection(), *query); d->originalSchema = new KDbQuerySchema(*query, d->tempData->connection()); + + bool ok; + KexiUtils::WaitCursorRemover remover; + d->currentParams = KexiQueryParameters::getParameters(0, d->tempData->connection(), d->originalSchema, &ok); + if (!ok) { + return false; + } } if (d->originalSchema) {