1 2 Previous Next 21 Replies Latest reply on Jul 15, 2015 11:44 AM by Jozef Demovic SVK

    gReport.navigate.paginate in APEX 5

    anai

      In APEX 5 gReport no longer exists.

      Is there an alternative to gReport.navigate.paginate?

      Thank you!

        • 1. Re: gReport.navigate.paginate in APEX 5
          anai

          Anyone?

          • 2. Re: gReport.navigate.paginate in APEX 5
            Sunil Bhatia

            Hi Anai,

             

            Can you place your problem in detail. What is meant by gReport here.

             

            If it is about pagination scheme of classic report, i see it replaced in apex 5.0 by apex.widget.report.paginate. Just see if this is the case, or report complete issue probably with example on apex.oracle.com.

             

            Hope it helps.

             

            -- Sunil Bhatia

            • 3. Re: gReport.navigate.paginate in APEX 5
              anai

              Hi, Sunil,

               

              thank you for your reply. I am aware of apex.widget.report.paginate, but that is not what I'm looking for.

              apex.widget.report.paginate is, as far as I know, used for pagination on classic reports.

              gReport.navigate.paginate was used for pagination on interactive reports.

               

              However, in APEX 5 the object gReport no longer exists (since we can have more than one IR per page) so I'm trying to find out what replaced it.

              • 4. Re: gReport.navigate.paginate in APEX 5
                Sunil Bhatia

                Well true,

                 

                Seems now because multiple interactive reports have been allowed in APEX 5.0, developers seems to have removed the object from its reference.

                 

                Also the anchor tag in pagination of APEX 4.2 seems to be replaced with button in APEX 5.0.

                 

                The attribute in which pagination is now data-pagination="pgR_min_row=1max_rows=15rows_fetched=15"

                 

                I am not sure this can be set through jQuery but cause is because of allowing multiple interactive report per page.

                 

                -- Sunil Bhatia

                • 5. Re: gReport.navigate.paginate in APEX 5
                  anai

                  Yes, the object has been removed from APEX 5. It was an undocumented function, so I'm wondering what replaced it.

                  • 6. Re: gReport.navigate.paginate in APEX 5
                    Anthony Rayner-Oracle

                    Hi Anai,

                     

                    As you have asserted, due to extensive changes to Interactive Reports in 5.0, both in support of multiple on a page, and to modernise the component, unfortunately any customisations based on the undocumented 'gReport' will no longer work, including custom pagination. The component was re-written underneath to leverage the jQuery UI Widget Factory, and as such the pagination functionality is now coded as a private method of the IR widget, which has no public interface and should not be called from custom code. We are looking to expose a number of these common methods in the future in some supported guise, but that's not available now I'm afraid.

                     

                    Can I ask, how was this being used in your application, out of interest?

                     

                    Regards,

                    Anthony.

                    1 person found this helpful
                    • 7. Re: gReport.navigate.paginate in APEX 5
                      anai

                      Hi, Anthony,

                       

                      I was using it to refresh interactive reports while preserving pagination. That is, after refreshing the report, I would position the pagination to the page where it was prior to the refresh.

                      Is there any way to do this in APEX 5? It would be really helpful!

                      • 8. Re: gReport.navigate.paginate in APEX 5
                        Anthony Rayner-Oracle

                        Hi Anai,

                         

                        I'm afraid not no, there is currently no supported way of achieving this. You can only do a refresh (resetting pagination) in a supported manner, either via the 'Refresh' Dynamic Action', or by triggering the 'apexrefresh' event.

                         

                        Sorry you have been affected by this.

                         

                        Regards,

                        Anthony.

                        1 person found this helpful
                        • 9. Re: gReport.navigate.paginate in APEX 5
                          anai

                          Hi, Anthony,

                           

                          thank you so much for your reply.

                          I just wanted to check, is there an *unsupported* way to do this? Lots of my applications have been affected by this and I would be happy even with a temporary solution.

                           

                          Thank you once again,

                          Ana

                          • 10. Re: gReport.navigate.paginate in APEX 5
                            fac586

                            anai wrote:

                             

                            I just wanted to check, is there an *unsupported* way to do this?

                            That's what got you into this mess in the first place. Haven't you learned something from that?

                            • 11. Re: gReport.navigate.paginate in APEX 5
                              Tom Petrus

                              Overall I agree that opting for an unsupported resolution will likely cause you to have work further down the line. Though that doesn't always have to mean it is outright bad.

                              Needing to resort to some workaround, making it clear in what way to do that, and simply understanding what has been done is just as ok for me.

                               

                              And why is it too hard to provide us with a more robust API to perform certain things? I love IRs just as much as anyone else, though I find the API lacklustre. What we had in apex 4.2 was that much of the JS code was not scoped correctly, such as obvious private functions or objects being available on the parent object anyway. On the other hand, that did provide some leeway. Now with 5.0 everything is hidden in a jQuery widget. That's fine, but it wouldn't have killed to provide some extra options or methods on it.

                              I could just as well argue as to how not much has changed overal. With regard to the pagination discussed here it's not spectacular. It's still the same old string, and the same old methodology. It's just in a data-tag now. The string is still pretty meaningless as the only relevant info in it is the "min row". I don't mean to belittle the Apex team here of course, the upgrades are apparent. Just the pagination (for one) is still feeling antique: why not multiple datatags, or why not just one since we only need the min row. I'd argue that all variables could really be held in the widget itself.

                               

                              I, too, have created Oracle-unsupported functionality. Sometimes the situation just calls for it. I've always documented this properly and made the necessary persons aware before I applied this code.

                              Certainly, here on the forums we should always be pushing people to be aware of unsupported or undocumented features and how it is a bad idea in general. And I too don't wish to spend 30 posts on trying to explain out-there-features. I'm not shooting at your cause and hard work here Paul. It just doesn't mean that sometimes doing the unsupported thing is inherently bad. And I just wish the users in question would understand what and why they do what they do.

                               

                              In this case I can relate to the OP's issue. I also don't get why it's nigh to impossible to simply refresh my report without losing pagination? I can be damnedest sure my data hasn't skewed (or did so in a limited way) and still this wouldn't work? And if I did end up on an invalid set I'd be alerted of this and have to reset the pagination.

                              I have working solution up here: https://apex.oracle.com/pls/apex/f?p=90922:4:

                              And yes, this will break eventually when code changes are made at Oracle's side and it's not super pretty and I'm very aware of it. A proper solution would then be for me to put this functionality in a JS file and not in pages themselves, so I can adapt when necessary. But I can read and understand the JS code Oracle has created.

                              I'd also tell OP to create a feature request, but there is one up already, ADMA. https://apex.oracle.com/pls/apex/f?p=55447 It just never received much attention.

                              • 12. Re: gReport.navigate.paginate in APEX 5
                                anai

                                Thank you, Tom, you have expressed my views much better than I ever could have done in English, which is not my native language.

                                 

                                I was aware, of course, that using unsupported functions could result in a lot of work later on, but at the time I had no other option because the project called for it, and I was hoping that by the time APEX 5 comes out, refreshing reports whilst preserving pagination would work out of the box. Unfortunately, that is not the case so I'm trying to find a solution, unsupported one, until this is resolved in some future update.

                                • 13. Re: gReport.navigate.paginate in APEX 5
                                  Tom Petrus

                                  Take a look at what I cooked up in my (previously linked, perhaps you glanced over it) application and see what you make of that. https://apex.oracle.com/pls/apex/f?p=90922:4

                                  • 14. Re: gReport.navigate.paginate in APEX 5
                                    anai

                                    Hi, Tom,

                                    I have clicked on it previously but couldn't see your solution.

                                    After login, I get redirected to your home page where I see a Caroussel, but no reports.

                                    Am I missing something?

                                    1 2 Previous Next