maandag 16 juli 2018

APEX 5.0 Cascading reports

Business case

You want to create a page with two or more reports that are connected with each other.  A kind of master-detail for reports.
In this example we show the list of departments and as a child report we show the employees of that department.

Solution

We start with building a blank page for our reports.  Add the different report regions on the page.  Whether you are using interactive reports or classic ones, it doesn't matter.  The solution works for both.


Once the reports are present and working independently, we can start making them connected.
The first report is called master and the second one is called the detail report.

Follow these steps to connect the reports:

  1. Create the necessary page items to hold the information to be passed on to the detail report.  In my case this is only the primary key.  So I create a page item called P7_DEPT_PK_ID.  These page items can be set to hidden, since they have no added value for the end-user.  But for testing purposes, we lease them visible so we can see what is being passed on.  You can make them hidden, once everything is working correctly.
  2. Now we need some javascript-code to pass the values of the current selected master record to these page items.  The easiest way is by using a link column on the master report.  As target for this link-column, we use an URL with the following destination:
    javascript:$s('P7_DEPT_PK_ID','#DEPARTMENT_ID#');
    You can see here that we are using a method called "$s", which can be used to put values in items.  As parameters we give the name of the destination parameter and the value, which in this case is the DEPARTMENT_ID from the currently selected master record.

    Some nice explanation on these javascript functions can be found in this blog: https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6341/index-en.html.
  3. Once the value of the PK is now in this page item, we still need to refresh the detail report.  This can be done through the use of a dynamic action.  In this dynamic action we indicate that whenever the page item P7_DEPT_PK_ID is changed, we need to refresh the detail report.
  4. The only remaining thing to do is to use the page item in the query of the detail report.
  5. Because we are using javascript to fill in the page item, we need to submit the page item to the server, when we are refreshing the detail report.  This is done through the property 'Page Items to Submit' on the detail report.
  6. Now you can run your solution




14 opmerkingen:

  1. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    BeantwoordenVerwijderen
  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
    python training in tambaram | python training in annanagar | python training in jayanagar

    BeantwoordenVerwijderen
  3. This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
    Java training in Chennai | Java training in Bangalore

    Java interview questions and answers | Core Java interview questions and answers

    BeantwoordenVerwijderen
  4. That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.
    Data Science Training in Indira nagar
    Data Science training in marathahalli

    BeantwoordenVerwijderen
  5. Thanks for your great and helpful presentation I like your good service. I always appreciate your post. That is very interesting I love reading and I am always searching for informative information like this. Well written article Thank You for Sharing with Us pmp training institute in chennai | pmp training class in chennai | pmp training near me | pmp training courses online | pmp training fee | |

    BeantwoordenVerwijderen
  6. Thanks a lot very much for the high your blog post quality and results-oriented help.
    Devops Training in Chennai | Devops Training Institute in Chennai

    BeantwoordenVerwijderen
  7. Did you hear there's a 12 word phrase you can tell your partner... that will trigger deep feelings of love and instinctual attractiveness for you deep inside his chest?

    Because hidden in these 12 words is a "secret signal" that fuels a man's instinct to love, please and look after you with all his heart...

    12 Words That Fuel A Man's Desire Instinct

    This instinct is so hardwired into a man's mind that it will drive him to work harder than before to love and admire you.

    As a matter of fact, fueling this powerful instinct is absolutely essential to achieving the best ever relationship with your man that the moment you send your man one of the "Secret Signals"...

    ...You will soon notice him expose his heart and soul to you in a way he never expressed before and he will recognize you as the one and only woman in the universe who has ever truly interested him.

    BeantwoordenVerwijderen
  8. The information regarding hyusman industry is very well explained.Step by step explanation is helping me to understand the concepts clearly.Your efforts are really worth.Keep going.
    Java training in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Online Training

    BeantwoordenVerwijderen
  9. Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
    sap training in chennai

    sap training in omr

    azure training in chennai

    azure training in omr

    cyber security course in chennai

    cyber security course in omr

    ethical hacking course in chennai

    ethical hacking course in omr

    BeantwoordenVerwijderen
  10. Mgmibet Casino Login - JTG Hub
    How to login to Mgmibet 군산 출장마사지 Casino and get your 원주 출장샵 login details. You can use any 충청북도 출장샵 of our links and make 양산 출장샵 your registration. You 대전광역 출장마사지 can open the

    BeantwoordenVerwijderen