fralx / LimeReport

Report generator for Qt Framework
http://limereport.ru/
Other
403 stars 154 forks source link

Setting ReportPages variable (Help) #322

Closed yanis60 closed 3 years ago

yanis60 commented 3 years ago

Hi,

I'm currently working on your project in order to add some new features, for example i've added borderStyle and cornerRadius for items, and i'm working on new function script called getFreeSpace (To get free space available of a page).

I use this code :

if(m_context->reportPages()->isEmpty() || page < 0 || page >= m_context->reportPages()->count()) return -1; int height = 0; foreach(BandDesignIntf* band, m_context->reportPages()->at(page - 1)->bands()){ height += band->height(); } return m_context->reportPages()->at(page - 1)->height() - height;

My problem is that reportPages is not defined, could you please show me how to get reportPages in order to work with pages?

Thanks

fralx commented 3 years ago

Hi!

My problem is that reportPages is not defined, could you please show me how to get reportPages in order to work with pages?

Unfortunately, pages in the context appear after the first pass. But I have added getPageFreeSpace(page) :) You can use it like this:

LimeReport.getPageFreeSpace(currentPage) 
yanis60 commented 3 years ago

Hi,

thank you, i've added borderStyle and cornerRadius for items can i create a pull request?

fralx commented 3 years ago

Yes of course.

yanis60 commented 3 years ago

Could you please show me how to calculate free space after pass?

fralx commented 3 years ago

What do you want to do? I think it would be simpler if we resolve a practical task.

yanis60 commented 3 years ago

I finally got it work thank you ;)