mirror of
				https://github.com/fralx/LimeReport.git
				synced 2025-10-31 13:21:22 +03:00 
			
		
		
		
	Merge pull request #241 from wartime/master
Increate line number for group header band connected to group header band.
This commit is contained in:
		| @@ -1,4 +1,4 @@ | |||||||
| /*************************************************************************** | /*************************************************************************** | ||||||
|  *   This file is part of the Lime Report project                          * |  *   This file is part of the Lime Report project                          * | ||||||
|  *   Copyright (C) 2015 by Alexander Arin                                  * |  *   Copyright (C) 2015 by Alexander Arin                                  * | ||||||
|  *   arin_a@bk.ru                                                          * |  *   arin_a@bk.ru                                                          * | ||||||
| @@ -636,11 +636,24 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand) | |||||||
|             bandDatasource->next(); |             bandDatasource->next(); | ||||||
|  |  | ||||||
|             datasources()->setReportVariable(varName,datasources()->variable(varName).toInt()+1); |             datasources()->setReportVariable(varName,datasources()->variable(varName).toInt()+1); | ||||||
|             foreach (BandDesignIntf* band, dataBand->childrenByType(BandDesignIntf::GroupHeader)){ |  | ||||||
|  |             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(); |                     QString groupLineVar = QLatin1String("line_")+band->objectName().toLower(); | ||||||
|                     if (datasources()->containsVariable(groupLineVar)) |                     if (datasources()->containsVariable(groupLineVar)) | ||||||
|                         datasources()->setReportVariable(groupLineVar,datasources()->variable(groupLineVar).toInt()+1); |                         datasources()->setReportVariable(groupLineVar,datasources()->variable(groupLineVar).toInt()+1); | ||||||
|                 } |                 } | ||||||
|  |                 bandList = childList; | ||||||
|  |             } | ||||||
|  |  | ||||||
|             renderGroupHeader(dataBand, bandDatasource, false); |             renderGroupHeader(dataBand, bandDatasource, false); | ||||||
|             if (dataBand->tryToKeepTogether()) closeDataGroup(dataBand); |             if (dataBand->tryToKeepTogether()) closeDataGroup(dataBand); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user