10 Replies Latest reply: Mar 27, 2012 3:10 PM by 510477 RSS

    Is this possible?

    510477
      I have an interactive report region showing a bunch of vendors. It's pretty straightforward with a link column (to edit the vendor) and the vendor name. Now what I'd like to do is display a region to the right that lists what types of things the vendor has been approved to provide: fuel, tires, etc. These assignments are in another table. I'd like to display the following result set if the user clicks on the name of the vendor in the Interactive report:
      select r.VENDOR_TYPE
        from VENDOR_TYPE_ASSIGN a, VENDOR_TYPE_REF r
       where a.VENDOR_TYPE_ID = r.VENDOR_TYPE_ID
         and a.VENDOR_ID = #VENDOR_ID#
      Any ideas?
        • 1. Re: Is this possible?
          jariola
          Hi,

          I think this Jeff Holoman's Blog post might help you
          http://jholoman.wordpress.com/2012/02/26/apex-4-1-page-items-to-submit/

          Regards,
          Jari

          -----
          http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
          • 2. Re: Is this possible?
            fac586
            blarman74 wrote:

            Any ideas?
            Create a report region (and possibly a custom report template if you don't want it to look like a basic report) based on:
            select r.VENDOR_TYPE
            from VENDOR_TYPE_ASSIGN a, VENDOR_TYPE_REF r
            where a.VENDOR_TYPE_ID = r.VENDOR_TYPE_ID
            and a.VENDOR_ID = :P1_VENDOR_ID
            Create a Dynamic Action with a jQuery selector to bind a click event to the values in the vendor name column that sets the value of <tt>P1_VENDOR_ID</tt> (getting the <tt>#VENDOR_ID#</tt> value using a JS expression) and refreshes the report region.
            • 3. Re: Is this possible?
              510477
              While this is an interesting idea, I'm failing to make the connection to how this helps me. It isn't a page item I'm trying to reference, but the value in a particular row in a report. If I can get the value I click on in the report to populate a page item that then refreshes the smaller report region, that would probably do the trick. I'm just not sure how to covert the #VENDOR_ID# from the row to the page item :P240_VENDOR_ID.
              • 4. Re: Is this possible?
                jariola
                Hi,

                Did you check example related to that blog?
                http://apex.oracle.com/pls/apex/f?p=18507:24

                Click master report first row icon and another report is refreshed showing details for clicked row.
                Isn't that what you looking for?

                Regards,
                Jari

                -----
                http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
                • 5. Re: Is this possible?
                  510477
                  Is there something you could point me at that shows how to retrieve the #VENDOR_ID# from the report row and populates the page item? I know nothing of how to use jQuery and little JavaScript. A basic tutorial would be very helpful.
                  • 6. Re: Is this possible?
                    jariola
                    Hi,

                    Jeff use IR link column attributes and place there onclick event.
                    He sets hidden item P24_DEPTNO value using $s function.

                    Dynamic action bind change event to P24_DEPTNO and trigger classic report refresh.

                    On classic report attributes he have set page items to submit.

                    Regards,
                    Jari

                    -----
                    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
                    • 7. Re: Is this possible?
                      tc*441059*in
                      Edit the Vendor column to be a link and then define the link to your current page and set the item IR_VENDOR_ID to #VENDOR_ID# - this will create an interactive report filter for your vendor ID and your interactive report contents will automatically be updated accordingly. No new items or query rewrites needed - just use the built in functionality of the IR.
                      • 8. Re: Is this possible?
                        510477
                        +Jeff use IR link column attributes and place there onclick event.
                        He sets hidden item P24_DEPTNO value using $s function.

                        Dynamic action bind change event to P24_DEPTNO and trigger classic report refresh.+

                        ?????

                        Your English is hard for me to follow, and my lack of understanding doesn't help.

                        I already have a link column in the IR - it links to edit the Vendor. What I want is to click on the vendor NAME in the IR and display the types of transactions enabled for that vendor using the specified query in a standard report. The example you directed me to at (http://apex.oracle.com/pls/apex/f?p=18507:24) is really close - I just can't see anything about how this is happening. I want to link the sub-report to the NAME column not the ID column as it is already taken.
                        • 9. Re: Is this possible?
                          jariola
                          blarman74 wrote:
                          Your English is hard for me to follow, and my lack of understanding doesn't help.
                          Hi,

                          ok, sorry.

                          Please spend time and read that blog post carefully, maybe you get it then

                          Regards,
                          Jari

                          -----
                          http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
                          • 10. Re: Is this possible?
                            510477
                            tc,

                            That works perfect and it's really simple. Thanks.