Sorry Arin, on my sample I forgot to put a test group field. That is working correctly.
My question is regarding custom data ON the header and footer that are not coming from DataBase data sources. How do I implement the GetCallBackData slot so I can get a request to set the values of the fields on the group header and footer?
See my sample code below, in my sample I sent you, I have four columns of data and 1 field on group header and 2 on group footer. But this way I only get a call for the 4 data fields and the groupField. I don't know if I could make myself clear, please let me know if you did not understand
void ReportsGenerator::LRGetCallbackData2(LimeReport::CallbackInfo info, QVariant &data) {
switch (info.dataType) {
case LimeReport::CallbackInfo::RowCount:
qDebug() << "P2 RowCount - i" << info.index << " - " << info.columnName << " - r " << this->_currentRow;
data = 4;
break;
case LimeReport::CallbackInfo::ColumnCount:
qDebug() << "P2 ColumnCount - i" << info.index << " - " << info.columnName << " - r " << this->_currentRow;
data = 4;
break;
case LimeReport::CallbackInfo::IsEmpty:
qDebug() << "P2 IsEmpty - r " << this->_currentRow << " - " << info.columnName;
data = true; //!ds->first();
break;
case LimeReport::CallbackInfo::ColumnHeaderData: {
switch(info.index) {
case 0:
data = "Name1";
break;
case 1:
data = "Value1";
break;
case 2:
data = "Name2";
break;
case 3:
data = "Value2";
break;
}
qDebug() << "P2 HeaderData - " << info.index << " - " << data.toString();
break;
}
case LimeReport::CallbackInfo::ColumnData:
qDebug() << "P2 Requested - i - " << info.index << " - " << info.columnName << " - r " << this->_currentRow;
if (info.columnName == "SamplesGroup")
data = "Resultados Gerais";
else {
data = "Data";
}
break;
default: break;
}
}