1. Sergio Ciordia
  2. Valentina Reports ADK
  3. Суббота, Декабрь 15 2018, 10:57 PM
  4.  Подписаться через email
Hi,

I'm newbie with Valentina Reports and I'm designing my first report but I have problems to limit the maximum number of records that can be displayed in one subreport per page. It means, for example I have an invoice with 28 records and I would like to show only 15 records per page. How could I do it, please?.

Thank you very much.

Best regards,
Sergio
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Sergio,

You need to show only 15, and the rest is not printed? Or just print them on the next page?
Комментарий
There are no comments made yet.
Sergio Ciordia Ответ принят
Hi Sergey,

No, I would like to limit the maximum number of records to 15 per page and if the number is higher, then print them on the next page.

Sergio
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
I've done it using the Java Script in the SubReport (not the main report).

1) Initialize "recs" prop in the pre_build script of the SubReport (report_pre_build.png)
report.recs = 0;

2) Increase this property after each record is plathe ced on page in the Report Body post_place (body_post_place.png)
report.recs++;

3) Insert the page break if the number of records is 15 in the Report Body pre_place (body_pre_place.png):
if( report.recs == 15 )
{
report.recs = 0;
report.newPage();
}

The page break will be inserted every 15 records of the SubReport.
Вложения
Комментарий
There are no comments made yet.
Sergio Ciordia Ответ принят
Thank you much Sergey, it works perfectly. :D

Best regards,
Sergio
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.