LimeReport icon indicating copy to clipboard operation
LimeReport copied to clipboard

aggregate functions not working in the reportheader but only in the reportfooter

Open rmantovani68 opened this issue 4 years ago • 2 comments

If I'm putting the field : $S{COUNT($D{colli_produzione_ordine.cpnmcol},"DataBand1")} in the reportfooter it works seamlessly If I'm putting the field in the reportheader it prints : Function COUNT not found or have wrong arguments Maybe it's because it has not yet calculated the sum or the count of the sql query...

rmantovani68 avatar Oct 07 '21 12:10 rmantovani68

Problem is in the method: QVariant ScriptFunctionsManager::calcGroupFunction(const QString &name, const QString &expressionID, const QString &bandName, QObject* currentPage) that calls
GroupFunction *DataSourceManager::groupFunction(const QString &name, const QString &expression, const QString &band)

if called for ReportHeader the m_groupFunctions.count(band) is 0 if called for ReportFooter the m_groupFunctions.count(band) is the correct number of elements

rmantovani68 avatar Oct 07 '21 13:10 rmantovani68

Hi. At the moment the group functions not works for Report Header. You can use them only in the DataHeaders and GroupHeaders

fralx avatar Oct 07 '21 19:10 fralx