9 Replies Latest reply on Oct 2, 2010 2:24 PM by BillC

    Invalid set of rows requested, the source data of the report has been modif

    BillC
      Hi,
      When searching in my list of users I get the "Invalid set of rows requested, the source data of the report has been modified. Reset Pagination" error.
      How do I use PPR or $a_report or ??????? to prevent it?

      I recreated on APEX site (even though we are still on 3.2)
      Login as developer1/psswrd

      * Email Notification
      Create
      Click Send To...
      Click "1 - 10 Next>" for next 10 people (at bottom)
      Search on k
      Get the "Invalid set of rows requested, the source data of the report has been modified. Reset Pagination" error.

      Both in 3.2 and 4.0


      Thank you, Bill
        • 1. Re: Invalid set of rows requested, the source data of the report has been modif
          510477
          So here's what is happening. You've created a report and told APEX only to grab 10 rows at a time. It starts by grabbing the first 10 rows, then gives you links to getting rows 11-20, 21-30, etc. If you drill into those subsets, you're effectively changing the base query for the next time, even if the next query doesn't have 30 rows to grab. Thus the error. You have a couple of options:

          1) Increase the number of rows to initially display. Typically, this is good from a user perspective as well, since the fewer clicks the user has to go through to get their data the better.

          2) Create a calculation that fires to reset the pagination when issuing a new search. Create a page item to control the number of records to return. Next, create a Page Branch and trigger it off your Submit button and give it a POST value like NEW or GO or something. Now create a calculation that resets your page item when the button gets fired. Last, on your report definition, go to Payout and Pagination and set the Number of Rows (Item) to be your new page item.

          There are probably a couple of other ways to do it as well.
          • 2. Re: Invalid set of rows requested, the source data of the report has been modif
            20020
            Hello Bill,

            ApEx holds on to where you scrolled to in your previous search. If the next search doesn't retrieve at least that number of pages of data, the page will crash with that error. In the branch to your report page, check "reset pagination for this page".

            This is also a good thing to do when returning from a "delete" operation - if ApEx was on, say, the third set of rows to display and you happen to delete the only row on that third set, you will also receive this error.

            That's all.

            Hope this helps,
            John

            If you find this information useful, please remember to mark the post "helpful" or "correct".
            • 3. Re: AJAX: Invalid set of rows requested, the source data of the report
              BillC
              Hi,
              I didn't mention that the search is an AJAX call that pulls the report from a different page.

              To look at the AJAX code:

                   Workspace     mytmp
                   Username      DEVELOPER1
                   Password     psswrd

              onclick="javascript:getAddrBkReport()" class="t14Button" value="Search"

              Edited by: BillC on Sep 30, 2010 3:24 PM
              • 4. Re: AJAX: Invalid set of rows requested, the source data of the report
                20020
                Hi BillC,

                Which application & page is giving you trouble?

                John
                • 5. Re: AJAX: Invalid set of rows requested, the source data of the report
                  BillC
                  Thanks for your response!

                  App 28406      Email Scheduler     
                  Run the application
                  click Email Notification
                  click Create button
                  Click Send To... button, the address book comes up.
                  Click "1 - 10 Next>" for next 10 people (at bottom)
                  Search on k
                  Get the "Invalid set of rows requested, the source data of the report has been modified. Reset Pagination" error.

                  This will have about a thousand names/emails in production..

                  Thank you for your help!
                  Bill
                  • 6. Re: AJAX: Invalid set of rows requested, the source data of the report
                    20020
                    No problem Bill. If you don't mind, I'm going to need to put in an alert() here or there to follow what is happening inside that javascript.

                    John
                    • 7. Re: AJAX: Invalid set of rows requested, the source data of the report
                      BillC
                      Do whatever you need to John...
                      Thanks a bunch!
                      • 8. Re: AJAX: Invalid set of rows requested, the source data of the report
                        20020
                        Bill,

                        I added an RP (reset pagination) to the following line in $a_report:
                          else{l_URL += 'pg_R_'+pId+':NO:RP&pg_max_rows='+pMax+'&pg_min_row='+pMin+
                                        '&pg_rows_fetched='+pFetched;}
                        RP is a way to instruct ApEx to reset pagination for the target page via the URL rather than explicitly setting "reset pagination" in a branch. This appears to have cleared up the issue. One thing that worries me a little, is that it appears you are using the same URL in your next/previous links - I thought for sure that my adding RP would result in page 1 always displaying when you click those links (ie. it would attempt to go to next set of rows, realize it has to reset pagination and go right back to first set of rows) - but it appears to be ignoring that for the next/previous links.

                        Hope this helps,
                        John

                        If you find this information useful, please remember to mark the post "helpful" or "correct".
                        • 9. Re: AJAX: Invalid set of rows requested, the source data of the report
                          BillC
                          Awesome! That is great, thanks a lot for your help...
                          Thanks again.. Bill