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




29 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 most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 
    Devops Training courses
    Devops Training in Bangalore
    Best Devops Training in pune
    Devops interview questions and answers

    BeantwoordenVerwijderen
  4. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 

    best rpa training in chennai | rpa online training |
    rpa training in chennai |
    rpa training in bangalore
    rpa training in pune
    rpa training in marathahalli
    rpa training in btm

    BeantwoordenVerwijderen
  5. 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
  6. 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
  7. 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
  8. This is really impressive post, I am inspired with your post, do post more blogs like this, I am waiting for your blogs.
    Regards,
    Devops Training in Chennai | Devops Certification in Chennai

    BeantwoordenVerwijderen
  9. 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
  10. Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    BeantwoordenVerwijderen
  11. We are a group of volunteers and starting a new initiative in a community. Your blog provided us valuable information to work on.You have done a marvellous job!
    Microsoft Azure online training
    Selenium online training
    Java online training
    Python online training
    uipath online training

    BeantwoordenVerwijderen
  12. 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
  13. Great post! I am see the programming coding and step by step execute the outputs.I am gather this coding more information.
    AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

    BeantwoordenVerwijderen
  14. 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
  15. 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
  16. This was a very informative article, indeed loved to read and clear my doubts. Keep us posted a lot more blogs. Also check out our blog pages too.

    data science training in chennai

    ccna training in chennai

    iot training in chennai

    cyber security training in chennai

    ethical hacking training in chennai

    BeantwoordenVerwijderen
  17. Hey, Wow all the posts are very informative for the people who visit this site. Good work! We also have a Website. Please feel free to visit our site. Thank you for sharing.
    Be Your Own Boss! If you're looking for a change in your work prospects, then let's prepare for your career from here!!!
    Self Employment | Women Development | Information Technology | Engineering Courses

    BeantwoordenVerwijderen
  18. 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