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
Lexicron
Frequent Visitor

How to conditionally hide report pages? Can I use bookmarks or Javascript? Or let users edit report?

Problem:

I have 4 pages, each page displays fields from a single record. Each record is an incident report. On any one day a customer could have reported any number of incidents, but this report will only show up to 4 incidents raised that day. If they only reported 1 incident, then pages 2, 3, and 4 will be empty. The report needs to be printed to PDF and returned to the customer who reported the incidents. The empty pages need to be omitted from the PDF though.

 

Development requirements:
The report is viewed in PowerBI Service. No PowerBI Desktop. The viewers predominantly access the report via a Power Apps Canvas app that passes a stored variable (customer ID) as a URL filter query. The report opens up in the browser and is automatically filtered right away by the filter value in the URL. It is part of my development requirement that my report viewers should not need to interact with the report beyond clicking Export > Export to PDF. The report cannot be interactive or have any data not-visible on screen, as everything needs to be printed to PDF. There is no drilldown, scrolling, clicking, advanced filtering. (The solution was sold this way before I had a say.) 

 

Option 1: I can achieve this by editing the report in PowerBI Service, right clicking the page/tabs and hiding them, before exporting to PDF. But using the edit-and-hide method means giving all my report viewers edit permission as well. Can this even be done? I don't see the option to give edit permission, only to read and/or reshare. 

 

Option 2: Is there a way to get PowerBI to do the hiding for me? 

 

Option 3: Can I use bookmarks for this? How do bookmarks work? Will they interfere with the filter value passed from the URL? Each viewing of the report must be unique to the filter value, I can't have a report bookmark overriding the filter. There are also multiple users with report viewing roles. If ViewerA is looking up customerID=1111, and ViewerB is looking up customerID=2222, the bookmarks need to work independently and give ViewerA non-empty pages for 1111 and ViewerB non-empty pages for 2222. Can bookmarks work for my problem?

 

Option 4: Can I use the Power BI Javascript API for this? But my report is not embedded, I don't have an app, and I don't know where to start with this Javascript API.

 

Option 5: Does someone smarter and more creative have any ideas for a solution please?

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Lexicron ,

 

You can add users who need to export PDF to the workspace as members, so that they can edit the report.

 

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

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @Lexicron ,

 

You can add users who need to export PDF to the workspace as members, so that they can edit the report.

 

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

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.

Top Solution Authors
Top Kudoed Authors