Pagination and remove_sort_preferences

Oracle 10g, Apex 3.1.1
Hello,
I have a dynamic report that uses a SQL Query (PL/SQL function body returning SQL query). The SQL statement is built in a package and depends on the values selected in two Select List With Submit on the page. Since one of the select lists can change the number of result columns, I am using apex_util.remove_sort_preferences immediately before the return statement in the function body. This works great, except that each time the user clicks on a pagination link, the sort preference is reset. I'm wondering if it's possible to somehow preserve the sort preference when the user is moving between results pages, but remove the sort preference when the query changes via the select list. I thought about setting up an application item to store the user's sort preference, but I don't know how to capture the pagination event. Does anyone have any suggestions how I can do this, or is there a more efficient way? I'm using Search Engine 1,2,3,4 (set based pagination). Thanks!
Lisa

I think maybe setting the "reset pagination" on the self referencing page branch may serve you better. You can set this page branch with pagination reset to be conditional on the Request being equal to either of your select list names (Select list with submit sets the actual submit request to the name of the item (list) that triggered the submit), then have a default self-page branch that doesn't contain the pagination reset.
-Richard

Similar Messages

  • How to acheive Pagination and Dynamic sorting in Web layout.

    Hi All,
    I'm new to Oracle Reports. I use Report Builder 10.1.2.0.2.
    I tried creating a template for simple tabular report. I modified the tempalte for Paper layout, Web layout ie modified .tdf, html, css files.
    When the data is dispalyed in the web browser, i need to do Pagination and dynamic sorting (ie when the column heading is clicked, it needs to do sorting by that column).
    In the jsp page of the report, it is possible but i want to incorporate this functionality in the Template. So that a single template can be used across multiple reprots with out any modification.
    Can any one please tell me how to do this.
    Please reply me at the earliest. Its very urgent.
    Thanks & Regards,
    P. Gayathri Devi

    Igor,
    You'll need to switch from using Partial Page Rendering to full page submits on that report. In version 4.0 we should be getting more control over event handling in PPRs but to what extent is still unknown.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur

  • JSF Custom component for table pagination and sorting

    hi
    i want such a custom component that render a table and table has the features of pagination and column sorting.
    any one know from where i can get such a custom component.
    (if this component is available with source then it would be more help full for me)
    thnks & regards,
    Haroon
    Message was edited by:
    HaroonAnwarPADHYAR

    I know two companies that offer JSF component for table pagination and sorting and AJAX based :
    http://www.teamdev.com/quipukit/demo/datatable/DataTable_filteringAndPaging.jsf
    http://java.samples.infragistics.com/NetAdvantage/JSF/2006.1/
    The problem? They are not open source..
    And I am too looking forward on this subject, because I want to develop my own custom component and add some features. If someone has any tips, references or samples of their own, it would be really appreciated.
    Thank you.
    Paul

  • RH 10 is suddenly flickering between pagination and displaying

    I am trying to work on a topic, but RH 10 is "flickering"... the lower right hand corner status (at the very bottom of the PM pane)  is flickering between "Pagination" and "Displaying".  The font and font size is flickering, and the Paragraph and Character Styles pod list is flickering from "Normal" thru the list and then back to "Normal" in a split second.  I cannot work in the topic...This seems to be happening no matter what topics I'm in... as well as if I create a new topic.
    I did some PM organization of images and topics... and it was fine until then.  I have made all the updates I can find, restarted my system, uninstalled and reinstalled RH and reapplied the updates.
    What the heck is going on?  HELP!

    Hi there
    I'd be shocked (and very skeptical) if someone were to pop in and say something like: It happened because you had... (insert reason here).
    The thing is, there are a multitude of things that could be done to a project to cause this or that kind of a result. So all we can do is really guess at things.
    So having said that, here's some food for thought.
    When you work with RoboHelp, lots and lots of files are involved that track different aspects of the project. The main project database exists as a "ProjectName.XPJ" file. And another database exists as a "ProjectName.CPD" file. I do believe I've noticed that RoboHelp will sort of "flicker" as it attempts to ensure these two files are in sync. Sometimes we find that the .CPD becomes corrupt and will need to be deleted. When we delete it, as RoboHelp opens the project with the missing CPD, it sees the CPD is missing and sets about baking up a fresh one. And that process can cause the flickering as the database is rebuilt. How long it may take and you would see this would vary depending on the complexity of your project.
    Not sure if it helps or not, but perhaps it explains why you are seeing what you are seeing.
    Cheers... Rick

  • Expanding text boxes, pagination and expanding to another page

    Attached is a link to a simple form which is actually part of a much larger form. It has several nested add and remove instances. I have three fairly simple issues I need to solve.
         1. Is it possible to set a text box to allow it to grow in height as information is added that exceeds the size of the text box. This feature is available as a property in Microsoft Access as an example. I know you can allow multiple lines but you can see them all without the expanding feature.
         2. This form is design to grow by adding instances. I would like to set up the pagination so it would flow to additional page(s). I think I would just like the line
    to continue to flow to the next page without creating a break in the primary instance if that makes sense (the top level of the instances - mode). This level could theoretically by larger than one page so this is probably best route to go. Currently it's not flowing at all to the 2nd page.
         3. Somehow I ended up with a 2nd page to the form. How do I delete that but yet have the expanding form automatically create a 2nd, 3rd (etc) page as required.
    http://share.planswift.com/download/?file=W0H3U2V5-GOPO-FI9G-1UIG-OTYPHTB46HB
    Thanks,
    Patrick

    Hi Patrick,
    I can't make changes to your form at the moment, but there are a few things you need to bear in mind. If you want items to expand and push objects down, then you will need a Flowed layout.
    See this example about making fields dynamic: http://assure.ly/g80MVY.
    Also this looks at the difference between Flowed (where you want to get to) and Positioned (where you are now) subforms: http://assure.ly/eSGQMt.
    Yes, just select the textfield and go to the LAyout palette. There under height, tick Expand to fit. If you preview this you will see that it expands, BUT will cross over objects beneath it. This is where you need to group objects in a Flowed subform, so that when it expands it will push objects down.
    The page needs to be set to Flowed. There are pagination settings available under the Object palette and you can start with Place = Follow previous and then Continue filling parent. You also want to make sure that for the subforms (and textfields) you have set in the Object palette that content is allowed to break over pages.
    Check your pagination settings.
    Hope that helps,
    Niall

  • Pagination and visited links issue

    I am creating reports on two tables which are structurally same but hold different set of data. I created one report page using SQL Query using PL/SQL function body returning SQL Query. The trick is to set a request value based on the link clicked by the user to run the query on the correct table. I am using following pagination scheme.
    "Search Engine 1,2,3,4(set based pagination)”
    The issue is with the “visited link” behavior of the links to the record sets in the pagination navigation bar (shown on the bottom right corner of the report region for each result set). Say the user has visits link 3 in pagination navigation bar on the report number one on table A. The browser correctly shows this link in visited link color. Now, if user opens report number 2 on table B, they see the link 3 again in visited color even if they are there for the very first time. This is sounds like a cosmetic nuisance, but this is sort of confusing for the users.
    I guess, since I am using the same page definition for both reports, the pagination object and associated links for the result sets in the pagination have same values. From browser perspective it is the same link and hence the links are shown visited.
    Is there a way that I can force a new pagination object based on which table I am accessing still using only one report page defined in HTMLDB. I do not want to create separate page for each report on each table.
    Thanks
    Salman

    I guess it was too wordy or it was not clear enough.
    In short, is it possible to clear out the visited link status (color changed) of the links to pagination resultset of a report within same session. The pagination type is "Search Engine 1,2,3,4(set based pagination)." I am using patched version 1.5.
    Thanks
    Salman

  • Pagination and pl/sql

    Greetings,
    I have the following piece of code that I'm using to display images uploaded through HTMLDB into Intermedia. My question is how to create pagination in the following sql statement:
    select s.id,s.thumb,s.thumbname,s.image.getWidth()as width,s.image.getHeight() as height from islidetable s order by id
    so that I can have it display x-y of z records. Is there a way in sql to select a group of records say 10-15 of 30 records?
    Thanks in Advance,
    Cliff
    declare
    obj ORDSYS.ORDImage;
    ctx raw(4000):=null;
    nxtseq number;
    thisrowid urowid;
    i_index number := 0;
    i_rows number := 4;
    inum number;
    BEGIN
    htp.tableOpen(cattributes=>'border=0 align=center bgcolor=black cellspacing=1 cellpadding=25');
    select count(*) into inum from islidetable;
    for b_rec in (select s.id,s.thumb,s.thumbname,s.image.getWidth()as width,s.image.getHeight() as height from islidetable s order by id) loop
    if (i_index mod i_rows) = 0 then
    if (i_index = 0) then
    htp.tableRowOpen(cattributes=>'bgcolor=white');
    htp.p('<td align=center><img src=xxutpa_mig.extract_thumb?p_file='||b_rec.id||'><br>'||b_rec.thumbname);
    htp.p('<br>W:'||b_rec.width||' H:'||b_rec.height||'</td>');
    i_index := i_index + 1;
    else
    htp.tableRowClose;
    htp.tableRowOpen(cattributes=>'bgcolor=white');
    htp.p('<td align=center><img src=xxutpa_mig.extract_thumb?p_file='||b_rec.id||'><br>'||b_rec.thumbname);
    htp.p('<br>Width:'||b_rec.width||' Height:'||b_rec.height||'</td>');
    i_index := i_index + 1;
    end if;
    else
    htp.p('<td align=center><img src=xxutpa_mig.extract_thumb?p_file='||b_rec.id||'><br>'||b_rec.thumbname);
    htp.p('<br>Width:'||b_rec.width||' Height:'||b_rec.height||'</td>');
    i_index := i_index + 1;
    end if;
    end loop;
    htp.tableRowClose;
    htp.tableClose;
    END;

    Hey Vikas,
    Yeah, these semantics have bitten me before. I'm doing a query and returning 14 records. Rather than display them in a 1x14 table, I want to split them up into a 3x5 table, displaying the first 3 records returned from the query in the first row, next 3 in the next row, and so on and so forth. Being verbose, if the query returned
    Jane Doe1   131 W. University   Anywhere, USA
    Jane Doe2   132 W. University   Someplace, USA
    Jane Doe3   133 W. University   Elsewhere, USA
    Jane Doe4   134 W. University   Nowhere, USA
    Jane Doe5   135 W. University   Here, USA
    Jane Doe6   136 W. University   There, USA
    I'd like to be able to display it as such:
    Jane Doe1                Jane Doe2               Jane Doe3
    131 Univ                 132 Univ                133 Univ
    Anywhere                 Someplace               Elsewhere
    Jane Doe4                Jane Doe5               Jane Doe6
    131 Univ                 132 Univ                133 Univ
    Nowhere                  Here                    There
    ..and so on and so forth through the next 9 records. Given that my query could return hundreds or thousands, I want to be able to paginate every 15 (or however many I deem sufficient) records.
    I hope this made more sense, and thanks for responding.
    TIA,
    cliff

  • Pagination and Reset Pagination

    I do not understand what pagination means
    and what "reset pagination" does.
    I think I need an example where I can observe
    the difference between using or omitting
    a pagination reset.
    I created a page with a report and a search tool.
    Apex created automatically a Reset Pagination Process.
    However, I was not able to observe the behavior
    of this process.
    The following explanation of the manual did not help me either:
    "In Report regions, resets pagination back to the first result set.
    The Application Express engine keeps track of where the user is
    within a given result set. This process category returns the user
    to the beginning result set. In other words, this category resets
    the counters associated with the report region to return the first
    part of the result set the next time the result set displays."
    Any better explanation/example?
    Thank you very much,
    Marios

    Pagination gives you "pages" of your result set.
    For example if you have a report that queries from the EMP table, and there are 100 rows in the emp table. If your report is set to display 20 records, then you have 5 "pages" of your report. The pagination allows the user to move from page to page of the result set, ie. rows 1-20, then rows 21-40 and so on.
    If the user has moved to say the 3rd "page" of the result set (rows 31-40) and you they somehow navigate back to this report but the parameters change and the query only returns 25 rows, if the pagination is not reset, then the report will attempt to look at the 3rd page of your result set ,which now does not exist. So this will cause an error.
    So when you navigate to a report, if there is a chance that the parameters have changed which will result in a different number of rows being returned by the query, then you should reset the pagination. Or always reset the pagination when the user changes parameters and queries the report again.

  • Pagination and interactive sort for drilldown report doesn't work fine

    Hi Anyone,
    I have a drilldown report includes three groups. I add the last group for pagination. But the details in each page doesn't accord to I specified and the detail record number is different in different page.
    Another issue is the interactive sort always sort in the first page scope. I set the data region or grouping to the table, and evaluate expression scrope to Detail scope.
    Anyone has experience on that?
    Thanks a lot

    Can you explain your scenario giving screenshot to make us understand how your groups are?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Printed Adobe Form - pagination and data content problem

    I have been making changes to HR Appraisal Forms and all goes well except when I want to paginate a section. 
    The text is in a value string.
    I define a flowed subform with direction Top to Bottom.  binding None
    Subform Pagination Place > Following Previous    After > Continue Filling Parent If Dataset Paginated > Goto content area (there is only one content arrea defined in this form
    Allow Page breaks within content.
    I have a table object within the Subform. Place > Following Previous    After > Continue Filling Parent If Dataset
    The table has a Header row Place > Top of Next Page (this works fine) checked Include Header Row Initial Page and Subsequent Page
    the Table row (body) Pagination Place > Following Previous    After > Continue Filling Parent If Dataset
    When I test with more data than fits on page I get overflow and pagination with the Header on both pages.
    The bad the data that overflows to the new page is the same from the start of the first page, it repeats.  aso the second page has the content the length of what the overflow data would have been.
    How do I get the data NOT to repeat from the beginning on the second page?   This should have been easy but I have tried almost everything to correct the problem EXCEPT define all the objects as subforms and use Acessibility to make them work as table or row.  Please remember that I am NOT trying to make an interactive form and just want printed overflow.

    Hi,
    It allows the save as from a process point of view there speaks nothing against having long notes. And in the smartform print and in any other online UI in PM (R/3, BSP, WD) the notes are displayed correctly.
    The PDF is just another UI component, and the only one with the issue. To be honest, I think the SAP note is a rubbish answer, and an easy way out. Yes, in general it is better to have short notes on element level and longer pieces of text in an attachment.
    But logically speaking, the PDF thing is just plainly a bug.
    But we can talk short or long about it, in the end SAP is the one with the final answer
    Regards and Groetjes,
    Maurice Hagen

  • What is pagination and "reset pagination" ?

    Can somebody tell me what exactly pagination is wrt APEX? What happens when we do a "reset pagination" ?
    ~Rose

    I don't think so.
    If your ABCD report shows rows 50-100. Then navigate to report XYZ (showing row 5-10). In XYZ you have a link to ABCD. If you click that link and you don't reset the pagination (so for the target page) then it will show report ABCD with rows 50-100 again.
    So - as far as I've experienced it - the pagination is report-dependent.

  • Interactive Report Pagination and count

    Hello,
    I have two situations I am hoping someone could help me with.
    Problem 1
    I am using interactive reports in APEX 3.2.1 and I have reports with rows >= 6000. currently pagination on reports is set to:
    X to Y of Z
    such that when the report is rendered it looks something like 1 - 15 of 6203 >.
    Is it possible to add 'objects' or 'buttons' that allow me to navigate directly to the last row or/first row e.g
    |<< < 1 - 15 of 6203 > >>|
    such that |<< or >>| navigates to the very end row while < or > navigates to the next set or rows? would this be javascript? if so, does anyone have code for it? unfortunately not only am I new to APEX, I am a novice at javascript as well.
    Problem 2
    Is it possible to have APEX interactive reports return a distinct count on fields that are not unique? All counts are equating to the count of the unique ID and has had me pulling my hair
    Any help is most welcome,
    Mufudzi

    Hi Mike,
    I have not managed to get 'Distinct count' to work. Unfortunately, the project I am working on for this neither has the time or budget to investigate further but hopefully I will be able to get a solution from someone as a "nice-to-know".
    Regarding the first problem I posted on, managed to come up with a solution using some html. Basically I created two html scripts (one above the report and the other below the pagination buttons at the bottom of the report)
    - for the top of report html I used the following code:
    +<td nowrap class="t13RegionBody"><>a href="#endofpage"<>End of Page</a></td>+
    +<td bgcolor="#EEEEEE" nowrap><a name="topofpage"><font color="#EEEEEE">Top of Page</font></a></td>+
    and called the script topofpage
    - for the bottom of report html script I called it endofpage and used the following code:
    +<td nowrap class="t13RegionBody"><>a href="#topofpage"<>Top of Page</a></td>+
    +<td nowrap bgcolor="#EEEEEE"><A NAME="endofpage"><font color="#EEEEEE">End of Page</font></A></td>+
    What the script does is when the "End of Page" hyperlink is clicked, it takes the user to the bottom of the screen/page and vice versa for the "Top of Page" hyperlink situated at the bottom of the page. Users will be educated on how to use the ROWS utility on the interactive report menu bar so that they can display all available rows on one page and use the links to navigate from top to bottom of page.
    Mufudzi
    Edited by: Mufudzi on Oct 2, 2009 12:20 PM

  • DataTable, pagination, and valuechangelistener.

    Hi, I'm working with dataTables and have a behavior issue I can't seem to find a solution to. I start with the following conditions:
    1) I want to use pagination to control the size of the table on the form,
    2) I do NOT want to submit (immediate) after each user entry (don't like the look).
    That said I find that when I change textFields on pages 1-3 and submit while page three is showing, only the textFields that were changed on page 3 fire the valuechangelistener. Those textFields changed on page one and two are ignored. Should the user navigate to a new web page those changes on table page 1&2 are lost.
    I am using virtual forms to control what is submitted when but cannot get inside the pagination controls to make all textField changes (regardless of page) fire at the same time.
    Anyone have a solution to this?
    Thanks.

    Sorry.
    it was a error on my side. every time i was getting just 10 rows like
    for (i=0; i< dataTable.rows;i++)
    instead, i needed to use for (i=0; i < (dataTable.getFirst+dataTable.rows);i++)HTH someone else.
    Thanks

  • DataTable pagination and Javascript

    Hi,
    I have a DataTable that has two pages. The user can enter an employee ID and i have to populate all the other fields for that row.
    Each row has a expenses field. I have to calculate the total for all the rows when a user enters certain amount in that field (remember, the DataTable has 2 pages), using Javascript.
    I can use valueChangeListener and calculate the total in the backend. but that's not an option as there are 3 such fields for each row.
    For some reason, the script doesn't work in the second page.
    Can someone tell me how to achieve the calculation using javascript for all the rows in 2 pages?
    Thanks

    Try keeping the pagination details (i.e. which page to display) in request scope with a default to page 1. Make sure all requests from the page to "itself" includes the pagination details. When a request comes from another page, the default will be used.

  • Pagination and first_rows hint

    For a report region, how does HTML DB pagination work if the query has a first_rows hint in it?
    The pagination scheme I am talking about is the "simplest" one, Rows X to Y with next/previous links.
    Suppose I have a large resultset (in the thousands). first_rows is designed to optimize the execution plan for fast response time. So I get my first few pages fast. As successive pages are fetched, it would start to get slower and slower, right? Especially because the HTML DB engine fetches all the rows for every page over and over again and discards all the rows before the currently displayed window.
    So, given a large resultset, is it advisable to first_rows hint the query?
    Heck forget the size of the resultset, wouldnt it make sense to first_rows hint all queries since interactive web apps always fast response to queries?
    Can someone please explain how all this works?
    Thanks

    I would expect most of the time a user would only
    page through the first few pages - if they need toAbsent the first_rows hint, the CBO behaviour is to optimize for best overall performance (corresponding to the the all_rows hint)
    Steve, I agree with you completely. So, since the user is going to page thru the first handful of pages anyway, why would I want to expend database resources to optimize for all_rows?
    I think my concern about getting slower and slower is very much justified. If I have a query region using htmldb_item calls to create a manual tabular form, each next/previous link fetches all the records from 1 all over again and discards rows that fall before the requested rows. There would be tons of wasted calls to htmldb_item and the associated context switching between SQL and PL/SQL.
    [When the pagination scheme is Rows X to Y, I fail to understand why HTML DB doesnt use the clever pagination technique Tom suggests at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064
    This would get just the rows needed and avoid unnecessary calls to htmldb_item. But I digress from the question I raised on this thread...]
    Tyler, Tom is not a big fan of hints, but he does recommend 2 hints that "give information" to the CBO that it wouldnt otherwise have. Those 2 hints are first_rows and cardinality!
    Thanks

Maybe you are looking for