Changeset View
Changeset View
Standalone View
Standalone View
kexi/plugins/reports/krscriptfunctions.cpp
Show All 19 Lines | |||||
20 | #include <db/cursor.h> | 20 | #include <db/cursor.h> | ||
21 | #include <db/utils.h> | 21 | #include <db/utils.h> | ||
22 | #include <kdebug.h> | 22 | #include <kdebug.h> | ||
23 | 23 | | |||
24 | KRScriptFunctions::KRScriptFunctions(const KoReportData* kodata, KexiDB::Connection* conn) | 24 | KRScriptFunctions::KRScriptFunctions(const KoReportData* kodata, KexiDB::Connection* conn) | ||
25 | { | 25 | { | ||
26 | m_cursor = kodata; | 26 | m_cursor = kodata; | ||
27 | m_connection = conn; | 27 | m_connection = conn; | ||
28 | | ||||
29 | if (m_connection->tableSchema(kodata->sourceName())) { | ||||
28 | m_source = kodata->sourceName(); | 30 | m_source = kodata->sourceName(); | ||
31 | } else if (m_connection->querySchema(kodata->sourceName())) { | ||||
32 | m_source = m_connection->selectStatement(*(m_connection->querySchema(kodata->sourceName()))); | ||||
33 | } | ||||
29 | } | 34 | } | ||
30 | 35 | | |||
31 | KRScriptFunctions::~KRScriptFunctions() | 36 | KRScriptFunctions::~KRScriptFunctions() | ||
32 | { | 37 | { | ||
33 | } | 38 | } | ||
34 | 39 | | |||
35 | void KRScriptFunctions::setWhere(const QString&w) | 40 | void KRScriptFunctions::setWhere(const QString&w) | ||
36 | { | 41 | { | ||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |