Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
E__
Helper III
Helper III

Recto verso printing of paginated report - extra blank pages if necessary

Hi,

 

I've made a paginated report that has a page end after every unit, which can consist of multiple pages. My colleagues now want to print the generated pdf recto verso, but they need to split the printed pages per unit. When a unit has an odd number of pages, the next unit starts at the backside of the pages of the previous one. Is there a way to add in a blank page at the end of the unit, only when the unit has an odd number of pages?

 

Thanks in advance!

Best,

Eva

6 REPLIES 6
v-yohua-msft
Community Support
Community Support

Hi, @E__ 

You can open the paginated report in Report Server and select Print

vyohuamsft_0-1723602126492.png

Select page size and orientation. Select Print.

vyohuamsft_1-1723602278225.png

Then wait for a minute.

vyohuamsft_2-1723602294762.png

Next, you can set the print page you want on the new print settings page.

vyohuamsft_3-1723602311617.png

If you want odd-numbered pages, you can choose Odd pages only

vyohuamsft_4-1723602494699.png

 

If you also want to leave blank space, use an expression to conditionally add a blank page. You can add a rectangle or text box at the end of a cell and set its visibility based on the number of pages.
Add a rectangle or text box at the end of the cell.
Use an expression to set the visibility of this rectangle or text box. Expressions can check if the page number is odd and then make the rectangle or text box visible. For example:

=IIF(Globals!PageNumber Mod 2 = 1, False, True)

Also adjust the page setup to ensure that the report's page setup (margins, size, etc.) is configured correctly to avoid any unexpected blank pages. You can check the following link:

Avoid blank pages when printing paginated reports - Power BI | Microsoft Learn

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

The printing of only odd does not help, because the printing is scripted (pdf is generated on schedule, and automatically printed), and the numer of pages per unit can vary between exports. 

 

The text box does sound like a good solution, but I get an error that the PageNumber can only be used in the header or footer. I can't find an alternative that I can use on the report page - do you know of something that exists?

 

Thanks,

Eva

Hi, @E__ 

You may need to adjust your paginated report to control your blank pages.

vyohuamsft_0-1724661576864.png

 

Or add blank pages manually, albeit a bit of a hassle.

Regarding the second text box, it can only be used in the footer and header. However, you can do this in the form of custom code, which can be a bit complicated. You can check the following link:

Custom code and assembly references in expressions in a paginated report in Report Designer - Micros...

 

The following code can be used:

vyohuamsft_2-1724663237168.png

 

Public PageNumber As Integer = 1
Public Function GetPageNumber() As Integer
    PageNumber += 1
    Return PageNumber
End Function

Use custom code in your report to set the visibility of rectangles or text boxes to the following expressions:

=IIF(Code.GetPageNumber() Mod 2 = 1, False, True)

Box selection table

vyohuamsft_3-1724663269607.png

 

vyohuamsft_4-1724663305660.png

 

vyohuamsft_5-1724663322846.png

 

Here is my preview:

Before

vyohuamsft_6-1724663383012.png

After

vyohuamsft_7-1724663433300.png

 

You can check the following links:

Add code to a paginated report - Microsoft Report Builder & Power BI Report Builder | Microsoft Lear...

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, @v-yohua-msft 

 

I can't seem to figure out where the textbox should go. I put it here, underneath my table,

E___0-1724843479333.png

But it only shows up on the last page, and not between the row groups of [Kast]. Where should I put it to generate the empty page after the end of the row group? 

 

Thanks,

Eva

Hi, @E__ 

My method doesn't necessarily require a text box, you can use it directly on your table. If you must use a text box, the text box for page numbers needs to be placed in the header and footer, and the footer is the space under the dotted line.

vyohuamsft_0-1724898769609.png


When you click on the gray area on the right, the code will appear in the property bar on the right, and then you can embed the custom code in the code, and then continue the operation I said above

 

Best Regards

Yongkang Hua

Hi @v-yohua-msft,

 

I think I understand - your method of using the code on the table, will have the table only render on odd pages, right? What I need is slightly different - sorry for the confusion. I need to add an extra blank page if the group [Kast] ends on an odd page. This way, when we print recto verso, we can have the next item in the row group on a new seperate sheet of paper.


Best,

Eva

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.