Forum Discussion

rafal7's avatar
rafal7
Frequent Visitor
2 years ago
Solved

Button to hide/show specific page

Hi,

I have to make the report, where end-user has to have option to show/hide specific page and than generate pdf (with or without that page) that is sent to client.

 

I've seen some page-security workarounds where you hide all pages except first and make navigator for all that pages and set permission for specific users, but I haven't found a solution where you can do it with a button.

 

Is it even possible? Or is this only possible with bookmarks/field parameters set to hide all visualizations and show another?

Or maybe you have another idea? Like for example don't print hidden pages in generate pdf view?

4 Replies

  • rafal7 

    Yes, it's possible to achieve the functionality you described using bookmarks and buttons in Power BI. Here's a general outline of how you can implement it:

    1. **Create Bookmarks**: Start by creating bookmarks for each page of your report, including one for the scenario where the specific page is hidden and one where it's shown.

    2. **Hide Pages**: By default, hide the specific page you want to give the user the option to show or hide.

    3. **Create Buttons**: Create buttons or slicers that the user can interact with to toggle the visibility of the specific page. For example, you can create a button labeled "Show Page X" and another labeled "Hide Page X".

    4. **Set Button Actions**: Set the actions for these buttons to apply the appropriate bookmark when clicked. The "Show Page X" button should apply the bookmark where the specific page is shown, and vice versa for the "Hide Page X" button.

    5. **Generate PDF**: When the user is ready to generate the PDF, they can interact with the buttons to show or hide the specific page as desired. Then, they can use the built-in PDF export feature in Power BI to generate the PDF with the current report state.

    By following these steps, you provide the end-user with the ability to show or hide a specific page in the report using buttons, and they can generate the PDF accordingly. This approach offers flexibility and customization while leveraging Power BI's built-in features.

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

    • rafal7's avatar
      rafal7
      Frequent Visitor

      Hi,

      Thank you for your response.

      But I have question for step 4. I don't know how to set it up. It seems like bookmarks don't store the state of pages either their are shown or hidden.

  • rafal7's avatar
    rafal7
    Frequent Visitor

    I assume it's not possible

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi rafal7

     

    If this need is important to you, you can propose an idea about this, you can submit your idea by going to the link below.

     

    Home (microsoft.com)

     

     

     

     

    Best Regards,

    Jayleny

     

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