1 Reply Latest reply: Sep 26, 2013 10:23 AM by jrimblas RSS

    Report data and page flow

    RideTheStorm

      Hi all,

       

      I need to modify the value of a page item when some conditions occur before a classic report executes the query and then, restore previous values.

       

      When does the report exactly calculates the results? ¿how is the normal flow of a page? In a http get the page is rendered, but in a http post is the page only processed or processed and rendered?

       

      Any idea how to do it? I'm using Apex 4.1.

       

      Thanks!!

       

      Regards

        • 1. Re: Report data and page flow
          jrimblas

          Hello RideTheStorm,

          This sounds like an odd requirement and I would say you don't need to "change" the value of the item, just write your SQL in the Classic Report to use what you need.

          But to your question...

           

          You can change the value with a Process or Computation that happens "Before Regions".  Then the report will use this value (as it's part of the Regions).

          Then a Process or Computation that has it's firing point anywhere after "After Regions" will be able to change the values.  Now because rendering already happen, if you inspect your page you'll see the "old/original" value, but session state will have the newly calculated value.  (However, a post will probably override it again as whatever is in the HTML is what will be posted back to APEX effectively using that value.  Hope this makes sense).

           

          The problem with this approach is that I wonder if it will affect pagination and sorting of the report as those actions will use the last value set.

          So, I would personally use a different item for the report that I don't need to change back and forth.

           

          Perhaps it would be helpful if you explain the business requirement you're trying to accomplish.

           

          As for the get and post.  The http get only renders (but it does execute all the steps in the rendering section).  When looking at a page go to "Utilities -> Page Events" to see a representation of the exact order in which things will be processed.

          For the POST, it will post/send data back to the server and process.  It will NOT render.  However... immediately after the post processing is complete something needs to render.  So a render will happen immediately following the Page Processing.  With a branch you can control which page will render next, but if nothing is specified usually the same page will render again.

           

          Hope this helps.

           

          Thanks

          -Jorge