1. Sergio Ciordia
  2. Valentina Reports ADK
  3. Saturday, December 15 2018, 10:57 PM
  4.  Subscribe via 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
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Sergio,

You need to show only 15, and the rest is not printed? Or just print them on the next page?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 1
Sergio Ciordia Accepted Answer
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
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 2
Sergey Pashkov Accepted Answer
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.
Attachments (3)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 3
Sergio Ciordia Accepted Answer
Thank you much Sergey, it works perfectly. :D

Best regards,
Sergio
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 4
  • Page :
  • 1


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

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories