This is a migrated thread and some comments may be shown as answers.

Add a blank page for each group with odd pages count

7 Answers 582 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matias
Top achievements
Rank 1
Matias asked on 27 Aug 2015, 01:59 PM

Hi there,

I have to print a group of invoices of different clients in one .pdf, and I need to add an extra blank page for each invoice that has odd pages count, because I need to print them using double-side print.

Example:

Invoice #1: 2 pages

Invoice #2: 1 page

Invoice #3: 1 page

I need to print a pdf with 6 pages (page 4 and 6 should be empty).

 

I'm using Reporting Q3 2013

Thanks in advance.

7 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 01 Sep 2015, 10:14 AM
Hello Matias,

You can insert blank pages in the report using the PageBreak property. However, this cannot be controlled by the odd/even page number, since the report is paged after it has been processed - Report Life Cycle. The scenario is not supported and you will need to use a third party PDF library to insert blank pages in the exported PDF file.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Matias
Top achievements
Rank 1
answered on 01 Sep 2015, 11:03 AM

Nasko, thank you for your response.

Regards.

0
Luke Burson
Top achievements
Rank 1
answered on 28 Jan 2021, 10:37 PM
Any chance there's been an update to be able do page breaks based on pagecount? 
0
Neli
Telerik team
answered on 02 Feb 2021, 02:13 PM

Hi Luke,

We still render the report based on the same approach. Maybe if you know know the number of records that will be displayed per page in advance, you may add a Grouping to the report and set the PageBreak property of the group. Can you give us more details about the scenario, so we might be able to provide any additional suggestions?

I will be looking forward to receiving an update from you.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Luke Burson
Top achievements
Rank 1
answered on 03 Feb 2021, 08:45 PM

Hi Neli,

I have a report book that I'd like to create that is full of individual reports with varying page length.  Basically it's

Report #1 - 5 pages
Report #2 - 4 pages
Report #3 - 9 pages

This creates a report book of 18 pages

 

What I'd like to be able to do is determine the odd numbered page reports and add a blank page after them

Report #1 - 5 pages + Add Blank Page
Report #2 - 4 pages
Report #3 - 9 pages + Add Blank Page
This creates a book of 20 pages and now I can print on the front and back and never have a report start on the back of a page.

Thanks for the help!

0
Neli
Telerik team
answered on 08 Feb 2021, 03:09 PM

Hello Luke,

Thank you for the additional details. The total number of the report document pages depends on the export format among other factors. This number is available in the Page sections of the Report - check Report Structure and How to: Add/Remove Page Header and Footer Sections. You may use the Page function PageCount to get the count of the generated pages. Note that when the count of the total pages becomes known the processing and rendering of the report have finished, hence it is not possible to add more pages.
If you know the number of the generated pages a-priory (generally, it depends also on the data), you may use Conditional Formatting or Bindings to manipulate the visibility of a dummy item or section (e.g. Report/Group Footer) to force the Reporting engine to generate an extra page. I'm afraid though, that in the general case this is not possible.

Let us know if you have further questions.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
piter
Top achievements
Rank 1
Iron
answered on 14 Mar 2023, 09:06 AM
Hello Matias. Have you found a solution for this trick? Please if you found help me.
Tags
General Discussions
Asked by
Matias
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Matias
Top achievements
Rank 1
Luke Burson
Top achievements
Rank 1
Neli
Telerik team
piter
Top achievements
Rank 1
Iron
Share this question
or