Discussions

Expand all | Collapse all

How to show an embedded report in a report

  • 1.  How to show an embedded report in a report

    Posted 03-19-2018 08:44
    Hi 
    I am trying to show an Embedded report in a report in another table. (I already have a report link, and can show the embedded report on the table).
    Any assistance would be appreciated.

    Thanks


  • 2.  RE: How to show an embedded report in a report

    Top
    Contributor
    Posted 03-19-2018 09:02
    You can do it with script - click on the +/- to expand/collapse the sub-query



    Subdatasheet 
    https://haversineconsulting.quickbase.com/db/bmnf7nrvf?a=td


  • 3.  RE: How to show an embedded report in a report

    Bronze
    Contributor
    Posted 08-30-2018 17:46
    Dan, Where is the code to show the embedded report field on clicking the +/- icon? Can you put us under the hood there, please?


  • 4.  RE: How to show an embedded report in a report



  • 5.  RE: How to show an embedded report in a report

    Bronze
    Contributor
    Posted 08-31-2018 12:01
    Dan, This works like a charm. Thank you so much!


  • 6.  RE: How to show an embedded report in a report

    Bronze
    Contributor
    Posted 10-24-2018 17:12
    Dan, The +/- functionality works fine until you use the dynamic filters. What am I missing? Once you use a DF to filter out some data, this special field does not respond at all. You have to remove all dynamic filters that have been applied and refresh the screen. Only then it works again. I tried to replace the "on" event with the click event and still the same effect. Any idea what may be causing this?


  • 7.  RE: How to show an embedded report in a report

    Top
    Contributor
    Posted 10-25-2018 09:02
    I think I created the initial demo before dynamic filters were released. I am sure it is simple to modify the script. If you need this functionality feel free to contact me off-world using the information in my profile:

    https://getsatisfaction.com/people/dandiebolt">https://getsatisfaction.com/people/dandiebolt">https://getsatisfaction.com/people/dandiebolt


  • 8.  RE: How to show an embedded report in a report

    Top
    Contributor
    Posted 10-25-2018 09:15
    Okay I briefly looked at this. When you invoke a filter QuickBase is making an AJAX call to QBI_TableDashboardUpdate however the pages does not reload:

    https://haversineconsulting.quickbase.com/db/bmnf7nrvf
    ?a=QBI_TableDashboardUpdate
    &charset=windows-1252

    Since the page does not reload the module.js file does not execute a second time - it only executes once when the page initially loads. You can get your code to react to filter changes by detecting hash changes (changes to the fragment identifier in the address bar):
    $(window).on("hashchange", function(event) {   //rerun script });
    Another way to detect a filter change is to create a mutation observer.

    I would have no hesitation implementing this myself but this type of functionality comes close to impinging on native behavior. You might want to read this timely post and heed MC Hammer's advice "U Can't Touch $(this)":

    https://community.quickbase.com/quickbase/topics/u-cant-touch-this">https://community.quickbase.com/quickbase/topics/u-cant-touch-this">https://community.quickbase.com/quickbase/topics/u-cant-touch-this


  • 9.  RE: How to show an embedded report in a report

    Bronze
    Contributor
    Posted 10-26-2018 20:55
    When you click on the dynamic filter, the hashchange event is getting fired, no doubt. But I can't rerun the script for the +/- in that event because that's not when I want it to run. AFTER the hashchange event has occurred, when the user clicks on the +/- button, that's when I want the script to run. But once the hashchange event has occurred even if I click on the +/- nothing happens.


  • 10.  RE: How to show an embedded report in a report

    Bronze
    Contributor
    Posted 10-26-2018 21:17
    Is the hashchange event disabling other events from occurring?


  • 11.  RE: How to show an embedded report in a report

    Top
    Contributor
    Posted 10-27-2018 12:41
    When the dynamic filter is invoked the HTML elements associated with the report are regenerated. This regeneration effectively removes the click handlers associated with the +/-  expando that the module.js script inects. Thus the click handler associated with the  +/-  expando has to be added after the dynamic filter regenerates the report and detecting the hashchange event is probably an adequate way to detect that the report has been regenerated.

    Getting this particular demo to work with dynamic filters comes close to interacting with native capabilities and might cause problems in the future if and when QuickBase modifies the code behind their dynamic filters implementation.

    I am not going to update my demo but I am sure it is straightforward to accomplish. If you want to pursue a solution fee free to contact me off-world using the information in my profile:

    https://getsatisfaction.com/people/dandiebolt">https://getsatisfaction.com/people/dandiebolt">https://getsatisfaction.com/people/dandiebolt


  • 12.  RE: How to show an embedded report in a report

    Posted 03-19-2018 13:14
    Hi John  in case you want to keep on native QB, (I do no know is there is another ) I am using forms as a report, and in other cases I create a page with the two o more reports that calls to the same record through the embedded reports.


    The solution than Dan offers you looks far more complete, that I am talking about.


  • 13.  RE: How to show an embedded report in a report

    Posted 03-19-2018 13:19
    Thanks for the Quick response. I will have a look tonight, if it doesn't work I might use QuickBase actions to achieve what I need.