5 Replies Latest reply: Oct 8, 2009 1:27 PM by brheitner RSS

    Asjust Classic Apex Report Automatically based on multiple field values

    brheitner
      Here is my quick question as we are still very new to Apex....
      We are trying to create a page that has multiple fields (various types of fields from multiple select, text fields,
      etc.) The user will choose/enter values in each of the fields, as the
      values are entered we have to alter the records returned from the report
      (classic report not interactive report) to change without loosing any of
      the information entered by the user on the screen.. I know it can be done,
      but could not find out how. What would your recommendation be to do this.

      - Brian
        • 1. Re: Asjust Classic Apex Report Automatically based on multiple field values
          Tyler-Oracle
          Brian,

          This sounds like a classic report filter scenario. The easy way to do this is:
          - Create 2 regions on a page. Top region has your parameter items, bottom region is your report.
          - Create a branch on the page so it branches to itself.
          - Create a "Search" button that submits the page.
          - reference the items in your query using bind variable syntax, ie where department_id = :P1_DEPARTMENT_ID

          So, a user will enter some filter criteria and press "Search" to submit the page. This will post these item values back the server so when the page is rendered again the report query can use them.

          Tyler Muth
          http://tylermuth.wordpress.com
          [Applied Oracle Security: Developing Secure Database and Middleware Environments|http://www.amazon.com/gp/product/0071613706?ie=UTF8&tag=tylsblo-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0071613706]
          • 2. Re: Asjust Classic Apex Report Automatically based on multiple field values
            brheitner
            Tyler,

            Actually I tried that already. But when the page submits for Seach it clears the page.. Do I have to set the Save state? or something else?

            Thank- you,
            - Brian
            • 3. Re: Asjust Classic Apex Report Automatically based on multiple field values
              brheitner
              Tyler,

              I found out what it was.. The page had a ResetPage process that Clear Cache for all Items on Pages (PageID,PageID,PageID)

              Thank you,
              - Brian
              • 4. Re: Asjust Classic Apex Report Automatically based on multiple field values
                Tyler-Oracle
                Brian,

                Glad you got it resolved. One issue you might run into is with pagination. So, search for something that returns a lot of rows, paginate a few pages into the result set (lets say 3), then search for something that returns only a few or one row(s). The report will still be on page 3, but the new result set doesn't have 3 pages of results. The way to deal with this is to create a "reset pagination" process that fires when they press the search button.

                Also, make sure when you test your app, you do so with a completely empty session state. The best way to do this is to close all instances of your browser then reopen and run your report. I see a lot of people run into issues on that first page view when they expect items to have a value but they are actually null.

                Tyler Muth
                http://tylermuth.wordpress.com
                [Applied Oracle Security: Developing Secure Database and Middleware Environments|http://www.amazon.com/gp/product/0071613706?ie=UTF8&tag=tylsblo-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0071613706]
                • 5. Re: Asjust Classic Apex Report Automatically based on multiple field values
                  brheitner
                  Thankyou Tyler for the heads up.

                  - Brian