cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Microsoft
Microsoft

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
Microsoft
Microsoft

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

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors