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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tommy_g
Helper V
Helper V

Setting different report background colors for a group of pages

Client has handed me a legacy Crystal Report for conversion. The first two pages have a white background. Easy. Pages 3 and beyond have a light yellow/beige background.

 

I can set the overall report background to the desired color (#FFF9EB) but that leaves me with a problem on the first two which are supposed to have a plain white background.

 

Is there any way to insert some type of break, as one might do in Microsoft Word?

 

I have tried a kludge with full-page rectangle, but this is very unstable, one pixel either way causes a gap or runover to another page.

2 ACCEPTED SOLUTIONS
RobThrive
Resolver I
Resolver I

By the sounds of things, you are talking about a paginated (SSRS rdl file) report, rather than a PBIX report?

 

If this is the case, I think you might be out of luck. To do this you would need to use a background expression like :

=IIF(Globals!PageNumber <= 2,"Transparent","Plum")

Problem is, you cannot use certain global variables like PageNumber in the body of the report, only the header and footer.

 

If you are outputting into excel (ideally) you can right click on your table --> Tablix Properties --> General and select "Add page break after" which will create a new excel tab for anything below that table, when you export to excel.

You can then colour your tables however you like.

 

If you are using PBIX, then I'm unsure whats the trouble. Different background colours for each tab is very easy.

View solution in original post

I should have mentioned "paginated", now that I think of it, "Report Server" covers both PBIX and RDL. Lesson learned.

 

The expression solution will work for me, as background colors are actually based on report structure rather than page counts.

 

View solution in original post

2 REPLIES 2
RobThrive
Resolver I
Resolver I

By the sounds of things, you are talking about a paginated (SSRS rdl file) report, rather than a PBIX report?

 

If this is the case, I think you might be out of luck. To do this you would need to use a background expression like :

=IIF(Globals!PageNumber <= 2,"Transparent","Plum")

Problem is, you cannot use certain global variables like PageNumber in the body of the report, only the header and footer.

 

If you are outputting into excel (ideally) you can right click on your table --> Tablix Properties --> General and select "Add page break after" which will create a new excel tab for anything below that table, when you export to excel.

You can then colour your tables however you like.

 

If you are using PBIX, then I'm unsure whats the trouble. Different background colours for each tab is very easy.

I should have mentioned "paginated", now that I think of it, "Report Server" covers both PBIX and RDL. Lesson learned.

 

The expression solution will work for me, as background colors are actually based on report structure rather than page counts.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.