Cognos Analytics

 View Only
  • 1.  Cognos 11 - How to add a back button for a drill through report.

    Posted Tue September 27, 2022 09:57 AM
    I'm not having much luck trying to add a back button to a drill through report.

    Any solutions I can test?

    Thanks,
    Jen

    ------------------------------
    Jenifer Broughton
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Cognos 11 - How to add a back button for a drill through report.

    IBM Champion
    Posted Tue September 27, 2022 11:57 AM
    Hi Jen,
    we had a reporting solution based on Cognos reports linked by drill-throughs many years ago. To achieve a back button we had to duplicate all reports for all possible report paths that the user could go via the drill-throughs - not a very fancy solution.

    Can you tell us why your users don't use the central navigation pane to switch back to the source report?

    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ
    Ingelfingen
    ------------------------------



  • 3.  RE: Cognos 11 - How to add a back button for a drill through report.

    Posted Tue September 27, 2022 01:06 PM
    Hi,

    Thanks for the feedback.  It was a user specific ask and being the inquisitive one, I wanted to see if it was possible using javascript etc.
    I've suggested options of having each drill thru open in it's own window  or opening in same window and using the switcher to access the previously ran reports.

    Thanks,
    Jen

    ------------------------------
    Jenifer Broughton
    ------------------------------



  • 4.  RE: Cognos 11 - How to add a back button for a drill through report.

    IBM Champion
    Posted Wed September 28, 2022 03:40 AM
    Hi Jenifer,

    Let's say you have 2 reports: Report1 an Report2.
    Report1 will drill through Report2.

    When you create the Drill through definition in Report1, you should disable "open in a new windows":


    In Report2, add a block, on the top. In this block, add an HTML element with the following code:
    <!DOCTYPE html>
    <html>
     
    <body>
        <button onclick="Previous()">Go Back 1 Page</button>
        <script>
            function Previous() {
                window.history.go(-1);
            }
        </script>
    </body>
     
    </html>​


    You need to go to the report property page and disable Run with full interactivity:

    Save both reports and run Report1 in HTML.

    Best regards,



    ------------------------------
    Patrick Neveu
    Positive Thinking Company
    ------------------------------



  • 5.  RE: Cognos 11 - How to add a back button for a drill through report.

    IBM Champion
    Posted Wed September 28, 2022 05:14 AM
    Edited by System Fri January 20, 2023 04:20 PM
    Hi, I don't really see the big deal with this requirement. In such cases I insert an ordinary Text Element "Back" with an own Drill-Through-Definition inside a Singleton in the second report that points back to the first report. In most cases I need to "re-set" some parameters for the filters. I use dummy data elements with constant (defaults) IDs in the second report for this in combination with consistant default values for the prompts in both reports (also using the prompt macro if needed).

    ------------------------------
    Philipp Hornung
    ------------------------------