mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 13:04:38 +03:00
Finish 1.4.14
This commit is contained in:
commit
acb0675a93
@ -673,12 +673,15 @@ void CallbackDatasource::first(){
|
||||
|
||||
QVariant CallbackDatasource::data(const QString& columnName)
|
||||
{
|
||||
CallbackInfo info;
|
||||
info.dataType = CallbackInfo::ColumnData;
|
||||
info.columnName = columnName;
|
||||
info.index = m_currentRow;
|
||||
QVariant result;
|
||||
emit getCallbackData(info,result);
|
||||
if (!eof()) //Don't read past the end
|
||||
{
|
||||
CallbackInfo info;
|
||||
info.dataType = CallbackInfo::ColumnData;
|
||||
info.columnName = columnName;
|
||||
info.index = m_currentRow;
|
||||
emit getCallbackData(info,result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
virtual bool next() = 0;
|
||||
virtual bool hasNext() = 0;
|
||||
virtual bool prior() = 0;
|
||||
virtual void undoPrior() = 0;
|
||||
virtual void first() = 0;
|
||||
virtual void last() = 0;
|
||||
virtual bool bof() = 0;
|
||||
@ -354,6 +355,7 @@ public:
|
||||
bool next();
|
||||
bool hasNext();
|
||||
bool prior();
|
||||
void undoPrior() {m_curRow++;}
|
||||
void first();
|
||||
void last();
|
||||
bool eof();
|
||||
@ -384,6 +386,7 @@ public:
|
||||
bool next();
|
||||
bool hasNext(){ if (!m_eof) return checkNextRecord(m_currentRow); else return false;}
|
||||
bool prior(){ if (m_currentRow !=-1) {m_currentRow--; return true;} else return false;}
|
||||
void undoPrior() {m_currentRow++;}
|
||||
void first();
|
||||
void last(){}
|
||||
bool bof(){return m_currentRow == -1;}
|
||||
|
@ -675,7 +675,7 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
||||
IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
|
||||
if (gb&&gb->isNeedToClose(m_datasources)){
|
||||
if (band->childBands().count()>0){
|
||||
dataSource->prior();
|
||||
bool didGoBack = dataSource->prior();
|
||||
foreach (BandDesignIntf* subBand, band->childrenByType(BandDesignIntf::GroupHeader)) {
|
||||
foreach(BandDesignIntf* footer, subBand->childrenByType(BandDesignIntf::GroupFooter)){
|
||||
renderBand(footer, 0);
|
||||
@ -687,7 +687,12 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
|
||||
renderBand(footer, 0, StartNewPageAsNeeded);
|
||||
}
|
||||
|
||||
dataSource->next();
|
||||
if (didGoBack)
|
||||
{
|
||||
//New Method to undo prior... Alternatively pass in bool isUndoPrior into next()
|
||||
dataSource->undoPrior();
|
||||
//dataSource->next(); //Also emit changePos, which it should not at this point
|
||||
}
|
||||
}
|
||||
closeDataGroup(band);
|
||||
// if (gb->isNeedToStartNewPage()){
|
||||
|
Loading…
Reference in New Issue
Block a user