LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: LCoetzer on June 17, 2017, 10:54:06 AM

Title: Last group footer not able to access group variables such as the vehicleName
Post by: LCoetzer on June 17, 2017, 10:54:06 AM
Hi

I ran into another issue whereby in the report footer for the last group I could not access the group variable value.
The reason was that I had reached eof and the m_eof variable was not being updated in the prior method.

I implemented the following simple fix in the CallbackDatasource header file to update the m_eof value:

    bool prior(){ if (m_currentRow !=-1) { m_currentRow--; if (m_rowCount != -1) m_eof = false; return true; } else return false; }
    void undoPrior() { m_currentRow++; if (m_rowCount != -1) m_eof = !(m_rowCount>0 && m_currentRow<m_rowCount); }

This fix will however only work when using the rowCount method and not the older changePos signal slot method.
For it to work with the signal slot method there would have to be a new "Prior" ChangePosType added.

Regards
   Louis Coetzer
Title: Re: Last group footer not able to access group variables such as the vehicleName
Post by: Arin Alex on June 22, 2017, 12:41:06 AM
I have fixed this issue (ver 1.4.19)
Title: Re: Last group footer not able to access group variables such as the vehicleName
Post by: LCoetzer on June 22, 2017, 04:30:06 PM
Thank you.  :D