mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
Increase line number for every group header
This commit is contained in:
parent
0be55cd889
commit
8d6cf97a48
@ -1,4 +1,4 @@
|
||||
/***************************************************************************
|
||||
/***************************************************************************
|
||||
* This file is part of the Lime Report project *
|
||||
* Copyright (C) 2015 by Alexander Arin *
|
||||
* arin_a@bk.ru *
|
||||
@ -636,10 +636,23 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
|
||||
bandDatasource->next();
|
||||
|
||||
datasources()->setReportVariable(varName,datasources()->variable(varName).toInt()+1);
|
||||
foreach (BandDesignIntf* band, dataBand->childrenByType(BandDesignIntf::GroupHeader)){
|
||||
QString groupLineVar = QLatin1String("line_")+band->objectName().toLower();
|
||||
if (datasources()->containsVariable(groupLineVar))
|
||||
datasources()->setReportVariable(groupLineVar,datasources()->variable(groupLineVar).toInt()+1);
|
||||
|
||||
QList<BandDesignIntf *> bandList;
|
||||
QList<BandDesignIntf *> childList;
|
||||
|
||||
bandList = dataBand->childrenByType(BandDesignIntf::GroupHeader);
|
||||
while (bandList.size() > 0)
|
||||
{
|
||||
childList.clear();
|
||||
foreach (BandDesignIntf* band, bandList)
|
||||
{
|
||||
childList.append(band->childrenByType(BandDesignIntf::GroupHeader));
|
||||
|
||||
QString groupLineVar = QLatin1String("line_")+band->objectName().toLower();
|
||||
if (datasources()->containsVariable(groupLineVar))
|
||||
datasources()->setReportVariable(groupLineVar,datasources()->variable(groupLineVar).toInt()+1);
|
||||
}
|
||||
bandList = childList;
|
||||
}
|
||||
|
||||
renderGroupHeader(dataBand, bandDatasource, false);
|
||||
|
Loading…
Reference in New Issue
Block a user