mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 20:22:58 +03:00
Group functions fixed for qtscriptengine
This commit is contained in:
parent
c2d731eef9
commit
537fec13fd
@ -346,8 +346,8 @@ void ScriptEngineManager::setDataManager(DataSourceManager *dataManager){
|
||||
LimeReport::Const::FUNCTION_MANAGER_NAME,
|
||||
m_functionManager,
|
||||
QString("function %1(fieldName, bandName, pageitem){\
|
||||
pageitem = typeof pageitem !== 'undefined' ? pageitem : 0; \
|
||||
return %2.calcGroupFunction(\"%1\",fieldName, bandName, pageitem);}"
|
||||
if (typeof pageitem == 'undefined') return %2.calcGroupFunction(\"%1\", fieldName, bandName); \
|
||||
else return %2.calcGroupFunction(\"%1\", fieldName, bandName, pageitem);}"
|
||||
).arg(func)
|
||||
.arg(LimeReport::Const::FUNCTION_MANAGER_NAME)
|
||||
);
|
||||
@ -1471,6 +1471,11 @@ QVariant ScriptFunctionsManager::calcGroupFunction(const QString &name, const QS
|
||||
}
|
||||
}
|
||||
|
||||
QVariant ScriptFunctionsManager::calcGroupFunction(const QString& name, const QString& expressionID, const QString& bandName)
|
||||
{
|
||||
return calcGroupFunction(name, expressionID, bandName, 0);
|
||||
}
|
||||
|
||||
QVariant ScriptFunctionsManager::line(const QString &bandName)
|
||||
{
|
||||
QString varName = QLatin1String("line_")+bandName.toLower();
|
||||
|
@ -307,6 +307,7 @@ public:
|
||||
foreach(IWrapperCreator* wrapper, m_wrappersFactory.values()){ delete wrapper;} m_wrappersFactory.clear();
|
||||
}
|
||||
Q_INVOKABLE QVariant calcGroupFunction(const QString& name, const QString& expressionID, const QString& bandName, QObject* currentPage);
|
||||
Q_INVOKABLE QVariant calcGroupFunction(const QString& name, const QString& expressionID, const QString& bandName);
|
||||
Q_INVOKABLE QVariant line(const QString& bandName);
|
||||
Q_INVOKABLE QVariant numberFormat(QVariant value, const char &format, int precision, const QString &locale);
|
||||
Q_INVOKABLE QVariant dateFormat(QVariant value, const QString& format);
|
||||
|
Loading…
Reference in New Issue
Block a user