About pagination

who can give an example of pagination including calculate sum and total sum using php code with sql query?
thanks!

Hi,
no patience after 4 minuts of waiting?
Tsetsetse...
Greetings from Hamburg
Thorsten Körner

Similar Messages

  • Question about Pagination and Page Number Display

    I am trying to figure out a way to display just part of the
    pages if there are 50 or so pages. For examples if the user is on
    page 20 I would like to the numbers to display like this:
    1 ... 18 19
    20 21 22 ... 50
    I could do this through JavaScript I think, but I was
    wondering if the library itself could do something like this.
    Or if you already have something like this, send me the link
    to your site. :)
    www.kayak.com has a good example of this as well.
    Thanks.
    Robert

    Hello Robert,
    You can change the spry:if condition that may look like this:
    spry:if="{ds_CurrentRowNumber} != {ds_RowNumber} &&
    {ds_CurrentRowNumber} + 5 > {ds_RowNumber} &&
    {ds_CurrentRowNumber} - 5 < {ds_RowNumber}"
    Regards,
    Cristian

  • Pagination query help needed for large table - force a different index

    I'm using a slight modification of the pagination query from over at Ask Tom's: [http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html]
    Mine looks like this when fetching the first 100 rows of all members with last name Smith, ordered by join date:
    SELECT members.*
    FROM members,
        SELECT RID, rownum rnum
        FROM
            SELECT rowid as RID
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate
        WHERE rownum <= 100
    WHERE rnum >= 1
             and RID = members.rowidThe difference between this and the one at Ask Tom's is that my innermost query just returns the ROWID. Then in the outermost query we join the ROWIDs returned to the members table, after we have pruned the ROWIDs down to only the chunk of 100 we want. This makes it MUCH faster (verifiably) on our large tables, as it is able to use the index on the innermost query (well... read on).
    The problem I have is this:
    SELECT rowid as RID
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindateThis will use the index for the predicate column (last_name) instead of the unique index I have defined for the joindate column (joindate, sequence). (Verifiable with explain plan). It is much slower this way on a large table. So I can hint it using either of the following methods:
    SELECT /*+ index(members, joindate_idx) */ rowid as RID
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindate
    SELECT /*+ first_rows(100) */ rowid as RID
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindateEither way, it now uses the index of the ORDER BY column (joindate_idx), so now it is much faster as it does not have to do a sort (remember, VERY large table, millions of records). So that seems good. But now, on my outermost query, I join the rowid with the meaningful columns of data from the members table, as commented below:
    SELECT members.*      -- Select all data from members table
    FROM members,           -- members table added to FROM clause
        SELECT RID, rownum rnum
        FROM
            SELECT /*+ index(members, joindate_idx) */ rowid as RID   -- Hint is ignored now that I am joining in the outer query
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate
        WHERE rownum <= 100
    WHERE rnum >= 1
            and RID = members.rowid           -- Merge the members table on the rowid we pulled from the inner queriesOnce I do this join, it goes back to using the predicate index (last_name) and has to perform the sort once it finds all matching values (which can be a lot in this table, there is high cardinality on some columns).
    So my question is, in the full query above, is there any way I can get it to use the ORDER BY column for indexing to prevent it from having to do a sort? The join is what causes it to revert back to using the predicate index, even with hints. Remove the join and just return the ROWIDs for those 100 records and it flies, even on 10 million records.
    It'd be great if there was some generic hint that could accomplish this, such that if we change the table/columns/indexes, we don't need to change the hint (the FIRST_ROWS hint is a good example of this, while the INDEX hint is the opposite), but any help would be appreciated. I can provide explain plans for any of the above if needed.
    Thanks!

    Lakmal Rajapakse wrote:
    OK here is an example to illustrate the advantage:
    SQL> set autot traceonly
    SQL> select * from (
    2  select a.*, rownum x  from
    3  (
    4  select a.* from aoswf.events a
    5  order by EVENT_DATETIME
    6  ) a
    7  where rownum <= 1200
    8  )
    9  where x >= 1100
    10  /
    101 rows selected.
    Execution Plan
    Plan hash value: 3711662397
    | Id  | Operation                      | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |            |  1200 |   521K|   192   (0)| 00:00:03 |
    |*  1 |  VIEW                          |            |  1200 |   521K|   192   (0)| 00:00:03 |
    |*  2 |   COUNT STOPKEY                |            |       |       |            |          |
    |   3 |    VIEW                        |            |  1200 |   506K|   192   (0)| 00:00:03 |
    |   4 |     TABLE ACCESS BY INDEX ROWID| EVENTS     |   253M|    34G|   192   (0)| 00:00:03 |
    |   5 |      INDEX FULL SCAN           | EVEN_IDX02 |  1200 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter("X">=1100)
    2 - filter(ROWNUM<=1200)
    Statistics
    0  recursive calls
    0  db block gets
    443  consistent gets
    0  physical reads
    0  redo size
    25203  bytes sent via SQL*Net to client
    281  bytes received via SQL*Net from client
    8  SQL*Net roundtrips to/from client
    0  sorts (memory)
    0  sorts (disk)
    101  rows processed
    SQL>
    SQL>
    SQL> select * from aoswf.events a, (
    2  select rid, rownum x  from
    3  (
    4  select rowid rid from aoswf.events a
    5  order by EVENT_DATETIME
    6  ) a
    7  where rownum <= 1200
    8  ) b
    9  where x >= 1100
    10  and a.rowid = rid
    11  /
    101 rows selected.
    Execution Plan
    Plan hash value: 2308864810
    | Id  | Operation                   | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |            |  1200 |   201K|   261K  (1)| 00:52:21 |
    |   1 |  NESTED LOOPS               |            |  1200 |   201K|   261K  (1)| 00:52:21 |
    |*  2 |   VIEW                      |            |  1200 | 30000 |   260K  (1)| 00:52:06 |
    |*  3 |    COUNT STOPKEY            |            |       |       |            |          |
    |   4 |     VIEW                    |            |   253M|  2895M|   260K  (1)| 00:52:06 |
    |   5 |      INDEX FULL SCAN        | EVEN_IDX02 |   253M|  4826M|   260K  (1)| 00:52:06 |
    |   6 |   TABLE ACCESS BY USER ROWID| EVENTS     |     1 |   147 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("X">=1100)
    3 - filter(ROWNUM<=1200)
    Statistics
    8  recursive calls
    0  db block gets
    117  consistent gets
    0  physical reads
    0  redo size
    27539  bytes sent via SQL*Net to client
    281  bytes received via SQL*Net from client
    8  SQL*Net roundtrips to/from client
    0  sorts (memory)
    0  sorts (disk)
    101  rows processed
    Lakmal (and OP),
    Not sure what advantage you are trying to show here. But considering that we are talking about pagination query here and order of records is important, your 2 queries will not always generate output in same order. Here is the test case:
    SQL> select * from v$version ;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.1
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    SQL> show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 103M
    SQL> create table t nologging as select * from all_objects where 1 = 2 ;
    Table created.
    SQL> create index t_idx on t(last_ddl_time) nologging ;
    Index created.
    SQL> insert /*+ APPEND */ into t (owner, object_name, object_id, created, last_ddl_time) select owner, object_name, object_id, created, sysdate - dbms_random.value(1, 100) from all_objects order by dbms_random.random;
    40617 rows created.
    SQL> commit ;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade=>true);
    PL/SQL procedure successfully completed.
    SQL> select object_id, object_name, created from t, (select rid, rownum rn from (select rowid rid from t order by created desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
    OBJECT_ID OBJECT_NAME                    CREATED
         47686 ALL$OLAP2_JOIN_KEY_COLUMN_USES 28-JUL-2009 08:08:39
         47672 ALL$OLAP2_CUBE_DIM_USES        28-JUL-2009 08:08:39
         47681 ALL$OLAP2_CUBE_MEASURE_MAPS    28-JUL-2009 08:08:39
         47682 ALL$OLAP2_FACT_LEVEL_USES      28-JUL-2009 08:08:39
         47685 ALL$OLAP2_AGGREGATION_USES     28-JUL-2009 08:08:39
         47692 ALL$OLAP2_CATALOGS             28-JUL-2009 08:08:39
         47665 ALL$OLAPMR_FACTTBLKEYMAPS      28-JUL-2009 08:08:39
         47688 ALL$OLAP2_DIM_LEVEL_ATTR_MAPS  28-JUL-2009 08:08:39
         47689 ALL$OLAP2_DIM_LEVELS_KEYMAPS   28-JUL-2009 08:08:39
         47669 ALL$OLAP9I2_HIER_DIMENSIONS    28-JUL-2009 08:08:39
         47666 ALL$OLAP9I1_HIER_DIMENSIONS    28-JUL-2009 08:08:39
    11 rows selected.
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
    OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
         11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
         13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
         37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
         36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
         26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
         16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
         36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
         14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
         12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
         42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
         15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
    11 rows selected.
    SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
    OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
         37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
         13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
         11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
         42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
         16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
         36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
         26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
         14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
         36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
         12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
         15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
    11 rows selected.
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc ;
    OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
         37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
         13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
         11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
         42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
         16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
         36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
         26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
         14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
         36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
         12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
         15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
    11 rows selected.
    SQL> set autotrace traceonly
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc
      2  ;
    11 rows selected.
    Execution Plan
    Plan hash value: 44968669
    | Id  | Operation                       | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                |       |  1200 | 91200 |   180   (2)| 00:00:03 |
    |   1 |  SORT ORDER BY                  |       |  1200 | 91200 |   180   (2)| 00:00:03 |
    |*  2 |   HASH JOIN                     |       |  1200 | 91200 |   179   (2)| 00:00:03 |
    |*  3 |    VIEW                         |       |  1200 | 30000 |    98   (0)| 00:00:02 |
    |*  4 |     COUNT STOPKEY               |       |       |       |            |          |
    |   5 |      VIEW                       |       | 40617 |   475K|    98   (0)| 00:00:02 |
    |   6 |       INDEX FULL SCAN DESCENDING| T_IDX | 40617 |   793K|    98   (0)| 00:00:02 |
    |   7 |    TABLE ACCESS FULL            | T     | 40617 |  2022K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("T".ROWID="T1"."RID")
       3 - filter("RN">=1190)
       4 - filter(ROWNUM<=1200)
    Statistics
              1  recursive calls
              0  db block gets
            348  consistent gets
              0  physical reads
              0  redo size
           1063  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
             11  rows processed
    SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
    11 rows selected.
    Execution Plan
    Plan hash value: 882605040
    | Id  | Operation                | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |      |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  1 |  VIEW                    |      |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  2 |   COUNT STOPKEY          |      |       |       |            |          |
    |   3 |    VIEW                  |      | 40617 |  1546K|    80   (2)| 00:00:01 |
    |*  4 |     SORT ORDER BY STOPKEY|      | 40617 |  2062K|    80   (2)| 00:00:01 |
    |   5 |      TABLE ACCESS FULL   | T    | 40617 |  2062K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("RN">=1190)
       2 - filter(ROWNUM<=1200)
       4 - filter(ROWNUM<=1200)
    Statistics
              0  recursive calls
              0  db block gets
            343  consistent gets
              0  physical reads
              0  redo size
           1063  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
             11  rows processed
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
    11 rows selected.
    Execution Plan
    Plan hash value: 168880862
    | Id  | Operation                      | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |       |  1200 | 91200 |   179   (2)| 00:00:03 |
    |*  1 |  HASH JOIN                     |       |  1200 | 91200 |   179   (2)| 00:00:03 |
    |*  2 |   VIEW                         |       |  1200 | 30000 |    98   (0)| 00:00:02 |
    |*  3 |    COUNT STOPKEY               |       |       |       |            |          |
    |   4 |     VIEW                       |       | 40617 |   475K|    98   (0)| 00:00:02 |
    |   5 |      INDEX FULL SCAN DESCENDING| T_IDX | 40617 |   793K|    98   (0)| 00:00:02 |
    |   6 |   TABLE ACCESS FULL            | T     | 40617 |  2022K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("T".ROWID="T1"."RID")
       2 - filter("RN">=1190)
       3 - filter(ROWNUM<=1200)
    Statistics
              0  recursive calls
              0  db block gets
            349  consistent gets
              0  physical reads
              0  redo size
           1063  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
             11  rows processed
    SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 order by last_ddl_time desc ;
    11 rows selected.
    Execution Plan
    Plan hash value: 882605040
    | Id  | Operation           | Name | Rows     | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |     |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  1 |  VIEW                |     |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  2 |   COUNT STOPKEY       |     |     |     |          |          |
    |   3 |    VIEW            |     | 40617 |  1546K|    80   (2)| 00:00:01 |
    |*  4 |     SORT ORDER BY STOPKEY|     | 40617 |  2062K|    80   (2)| 00:00:01 |
    |   5 |      TABLE ACCESS FULL      | T     | 40617 |  2062K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("RN">=1190)
       2 - filter(ROWNUM<=1200)
       4 - filter(ROWNUM<=1200)
    Statistics
         175  recursive calls
           0  db block gets
         388  consistent gets
           0  physical reads
           0  redo size
           1063  bytes sent via SQL*Net to client
         385  bytes received via SQL*Net from client
           2  SQL*Net roundtrips to/from client
           4  sorts (memory)
           0  sorts (disk)
          11  rows processed
    SQL> set autotrace off
    SQL> spool offAs you will see, the join query here has to have an ORDER BY clause at the end to ensure that records are correctly sorted. You can not rely on optimizer choosing NESTED LOOP join method and, as above example shows, when optimizer chooses HASH JOIN, oracle is free to return rows in no particular order.
    The query that does not involve join always returns rows in the desired order. Adding an ORDER BY does add a step in the plan for the query using join but does not affect the other query.

  • Search criteria is lost during pagination.

    Hi all,
    I am having a sql query report which retrieves rows based on user's input in the field. Total number of rows returned is 8. And I chose pagination with previous and next options. And the number of rows is set be 5. When I click on next, the search criteria in the field is lost and the result is not displayed. I am reading a lot about pagination in the forums, but I am lost at this point. I am new and still taking little steps. Can someone be kind and point me in right direction, give me some advice.
    Thanks in advance,
    Rgds,
    Suma.

    Hi mcghan,
    Thank you for replying. Yes, You are right in that I did have a clear session process on load-after footer clear cache of page 3. I put that because, after I run the search page and do some modifications and rerun the page, I still had the old search criteria retained. So, now I will need to figure out at what point I should put clear cache process! If you have any ideas to share I appreciate it. I do thank you for your time.
    Rgds,
    Suma.

  • Custom pagination

    Hello,
    I have a manual tabular form (checkboxes and radiogroups included). I need to customize a default pagination look, hide previous link and submit each page to save results when user clicks next link. Is there a way to reuse internal pagination for my needs? APEX has a pagination scheme 'Use Externally Created Pagination Buttons'. Has anyone an example of how to use this option?
    Thanks.

    Hello Jari,
    >> Do you know what is difference of that and "Use Externally Created Pagination Buttons" option, if any?
    From your answer I understand there is no difference.
    Well, you understand wrong :)
    My answer said “This option actually telling the Apex engine ‘don’t embed any pagination related elements in my page’”. It doesn’t tell it to ignore pagination all together, as it happens if you choose “No Pagination Selected”.
    Sometimes semantics are important. If you choose “Use Externally Created Pagination Buttons”, the APEX engine assumes you have a pagination scheme, but you will use your own buttons to control it. The APEX engine itself continue to populate its internal pagination related elements, like the substitution strings #ROWS_FETCHED# , #TOTAL_ROWS# etc., and some other internal variables. Those will not be used (will remain NULL) if you choose “No Pagination Selected”.
    From the end user point of view, if you are not implementing your own external pagination, the final (visual) result of both options is the same. However, if you do have your own external pagination scheme, the APEX engine will support it.
    Hope this time I was more clear.
    >> I have try ask about pagination scheme "Use Externally Created Pagination Buttons" without success
    I didn’t see this post, however I have to admit that so far I didn’t find any reason to design my own pagination scheme. Taking the flexibility of the report templates, which allow you, with the pagination sub-templates, to design your own pagination link, and on the other hand, the complexity of running your own pagination in the SQL level, you should have really special pagination demands to warrant the efforts.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • Is there any way to sent apex reports in mail

    Hi All,
    I have a requirement to sent an apex report as a mail. Is it possible? Or will I have to write PLSQL procedure to collect the records and embed in html tags and then send the mail
    I tried to use &lt;iframe&gt; tag and embed the apex page which is public in to the mail, But it doesn't look good.
    Thanks & Regards,
    Vikas Krishna

    Vikas,
    As I understand it, this will be a feature of 4.0. However, for now you must still create them manually. Using public pages, as you've seen, can be tricky. Think about pagination and such.
    If an iframe would have "worked" then why not an email with a link back to the right page?
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Help needed in Export to Excel

    Hi All,
    I needed some clarifications/suggestions on using the export to excel.
    1) When I click on export to excel, a <div> tag also gets exported. I came to know that this is becuse of selecting the "Enable Partail Page Refresh" to Yes. Now, I have pagination in my reports and I also need to export to CSV/Excel. Is there no way where in I can use PPR as well as export the report without the DIV tag?
    2) I have a number column to which I have given APEX inbuilt hyperlinks. When I do an export the columns where I have given these links do not get Exported. Any way to overcome this? I cant give links in SQL query as then all number formatting would be lost.
    3) In my report display I have colspan = "2" for some alternate rows. In my excel output I obtain these correctly but without colspan. Is it possible to merge the cells in excel output wherever there is colspan="2"? Or am I asking too much?
    Any suggestions would be welcome. Please let me know what can be done to solve this.

    Hi
    One solution which I've used before is to have a separate page for the export. Have a report on that page that uses the same query as the actual report (including any filters based on page items) and set the report to use the Export: CSV template. The Export link on the original page needs to be removed and replaced with a link to the new page. When you click the new link, the page opens as a download file automatically.
    This way, you don't need to worry about pagination and you can use different fields on your export.
    Andy

  • What exactly is "All" when handling webapp items in a collection?

    In reference to this documentation - http://docs.businesscatalyst.com/dev-assets/reference#!/how-tos/liquid/listing-and-filtering.html and also when using collections, Does All mean All or does it only list 500 items at a time? Also, what is the difference in performance speed when say looping through a collection vs using categories to display specific items. I have had webapps that contained around 70,000 items before, so I was curious.

    Hey mate,
    First thing is with collections etc I do not think pagination, fetching etc has been finished 100%, not much documentation either and on objects I have seen info on that change.
    I have a forum post about pagination and things like collections and the use cases (that or I emailed the BC guys)
    Basically covering like what I know is going through your head... You have a collection, so how do you iterate through the other pages, what happens when you want to show just 5 and no data etc.
    BC limit is for performance and server reasons of course which is fine, but as you indicated you may want to display more so making another request to fetch the next chunk with API. You can do that with module_data but one of the issues I have raised and I can see happening is that if some of this core stuff is not covered on the core modules - All the work to update BC modules would end up being a waste of time, because if things like this crop up you would just end up using module_data for nearly everything as the API's role out. Which of course is OTT.

  • FTP upload on a web App

    Hi people, I am creating a web application which on one part need the user to upload an image. Rigth now iam testin the site on a free web host and so it just let me upload files using FTP, the problem is that i cant find the way to upload the image, i already know how to upload files to FTP with flex but that was using the "File" class which you can only use on an AIR application, how could i achieve the same result from a web application?
    Thanks

    Not too sure about pagination and filtering/sorting.  You might have to hack that together with some javascript and/or ajax.
    Here's my advice on the last two...
    The owner of their record in the web app needs to be able to edit only their own listing.
    This is the default functionality of customer submitted web app items in a secure zone.  They can only edit their own web app items.  Make sure the {tag_edit} tag is included in your web app item list view and if that list view is rendered in the Secure Zone while the user is logged in, the owner of that web app item will see the EDIT link to edit their web app item.
    but can only be shown if that user selects the radio button field to allow us to publish their email address.
    While I advise against showing an email address in plain text on the web, if you are ONLY including this web app in a secure zone then this could be ok.  Having a plain text email address in publick html markup is a no-no.  Spambots will grab it and start spamming you.
    But if you do intend to do this only in the secure zone and the logged in users are trusted you can probably just:
    Include a field name in your web app form called "showemail" and use the checkbox data type.
    Include a blank field that you hide in your form called "owneremail" and use the string datatypeHide it like so by manually editing the form markup: <input type="hidden" id="owneremail" name="CAT...." />
    Use some javascript so that when someone sets the checkbox for "show email address" it fills in this hidden field.  If the form is in a securezone you can just use {module_emailaddress} in your actual javascript code on that page to output the user's email address and fill the #owneremail input with that value.
    Someone else might have more information about pagination.  I forget if pagination is built into web app lists.

  • Print content of JTextComponent

    Good news for us! In the next release 1.6, sun is adding method print to JTextComponent as they did for JTable. I test the code, it is pretty well done, with header and pagination (no line is broken down between pages even inside a table row with different number of lines in different columns.
    I myselves has to spent a lot of time implementing the print method, but it's still buggy.
    The only problem with this version of JTextComponent from Sun is that it does not give the option to scale the printout to fit page width, otherwise, it's realy great.
    Any body interested shoud give a try.

    There are a few articles about pagination in JEditorPane and printing. It supports header/footer and their direct editing.
    http://innovative-java.com/articles/articles.html
    regards,
    Stas

  • Question about clear page and reset pagination

    Hi,
    I have a question about clear pages and the reset pagination in an URL. What is the reason why a clear page doesn't also trigger a reset pagination on the pages which are cleared?
    I can't really imagine a business case where it makes sense to clear all data of page items on a page and don't reset the pagination of reports on that page which probably use a page item in there where clause...
    The drawback of this behavior is that a developer always has to set the reset pagination checkbox when he clears the target page and the even bigger drawback is that if you specify other pages to clear, you can't reset pagination for them, because reset pagination only works for the target page.
    Thanks for your input.
    Patrick
    *** New *** Oracle APEX Essentials *** http://essentials.oracleapex.info/
    My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/

    Enhancement request filed, thanks,
    Scott

  • Problem in pagination

    hi,
    I am working on the pagination concept using JSP and SQL.
    I written stored procedure for pagination..its nicely working and i am using callable statement to call the procedure in my jsp code....if i am passing values within the parameter ..i am getting the answer....but i have to get the value at runtime...
    In my jsp code.i am calling the procedure like this:
    java.sql.CallableStatement proc =
    cn.prepareCall("{call newPage2('%telic%',2,10,24)}");
    its working fine...But i have to get the string from html..I have get the values at runtime rather than passing the values directly...
    Details about the above parameters which i have used in my code :
    The string that be searched - "telic"
    2 = Refers to the current page
    10 = page size(no of items per page)
    24 = total number of records;
    for Example if i am searching for the word "telic".I have the fields in the database such as names,address.
    The word "telic" has to be searched in the above fields.
    My doubts are:
    1) How do i pass the text from the HTML to the stored procedure.
    2) I am not sure about passing the values to a stored procedure at runtime.
         java.sql.CallableStatement proc =
    cn.prepareCall("{call newPage2(?,?,?,?)}");
         How should i pass the values at runtime instead of "?" mark.
    3)Suppose if i am using the getParameter method to get the string value..How can i pass the string variable instead of question mark(?).
    can anyone help me...
    Thanks in advance.

    Read the documentation for CallableStatement. There are methods for setting parameters.
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/CallableStatement.html

  • Not getting all records in pagination

    I am also have a problem getting all records in the report as the post on Apr. 21,2004. My reports pagination stops at 500. When I set the 'max row count' to 100000. The pagination at the bottom of my page disapears. When I leave 'max row count' empty, it only goes from 1-500. No way to view records past the 500th record.
    I see there was a post on Apr. 21, 2004 about the same thing but it did not specify a fix or work around or if I'm missing a setting. (also tried the log off/on but did not help).
    *My pagination Scheme is 'Row Ranges 1-15 16-30 in select list(wiht pagination)'
    *My report has 1000+ records.
    Thanks, Paula

    The actual number of rows supported by the select list depends on how many rows you show on each page. If you go with the default of 15 rows, you would be able to use the select list with close to 5000 rows. If you increase the number of rows per page, the select list will work with even more rows.
    If the select list can't be used, it may make sense to consider using the "row ranges with set pagination" style. Set pagination lets you navigate from one set to the next instead of one page to the next, so you can navigate through your result set a lot quicker.
    However the best option for reports with that many rows would be "row ranges x-y", without showing the total number of rows. The reason is that the report renders a lot faster if you don't have the total number of rows calculated. In order to better be able to find certain records, I would recommend a search field on your report page that lets you filter the result set.
    Hope this helps,
    Marc

  • 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

  • Adding form pagination without the wizard

    Hello,
    I'm trying to add a form pagination feature into an existing page. When I'm trying to use the Create Form Pagination Wizard I'm getting the following error: "The Create Form Pagination Wizard uses the onChange JavaScript event to alert users when they are about to exit a page without saving their changes. Remove the onChange event from any item with a source of Database Column and restart the wizard."
    I have many items on this page with onchange event, and I really don't want to erase all of then, using the wizard, and retyping them again. Is there a way to bypass this problem? I'm actually looking to use the " Get Next or Previous Primary Key Value" process. Can I manually create this process without the "help" of the wizard?
    Thanks,
    Arie.

    Arie - Perhaps you could create a temporary form page with a "clean" form and then create the form pagination process there. Then copy that process to your existing form page. After the copy, edit the process and change all the item names, column names, etc., in the process definition page and create any items required to support it. Finally, delete the temporary form page.
    Scott

Maybe you are looking for

  • Problem with Date Variable in Web I

    Hi everybody, In the BW I have a query with a Date Variable (0date) and when i execute the WebI report the variable shows date and time, like "04/22/2010 00:00:00". Is it possible i remove the time from the variable ? I need to do this cause i use th

  • Base="" sub search in DSEE and OpenLdap & SLAPI_PLUGIN_PRE_SEARCH_FN troubl

    I'm trying to migrate some application from using OpenLdap as user information repositorium, to Sun Directory Server 6.2. The suffixes layout in OpenLdap looks like this: rootDSE      |      | - cn=app_configuration      | - dc=com      |          |

  • Kxs logs in debug mode

    I have my kxs logs in debug mode. I am trying to understand what how much time my request takes to get served by kjs and on which engine. The output is as below: [22/Apr/2004 23:20:05:1] info: NSAPICLI-012: plugin reqstart, tickct: 1082686805s 156055

  • Error installing OAM against Sun Directory Server 6.3: No such object (32)

    Hi folks, I'm getting error installing OAM 10.1.4.3.0 (Linux, 64 bit) against Sun Directory Server 6.3. I've followed Oracle troubleshooting doc (http://download.oracle.com/docs/cd/E15217_01/doc.1014/e12493/trouble.htm#BABBAAFH), and replaced every o

  • Crash upon opening Log and Capture

    I'm working with a friend to solve her FCP problem. Everytime she opens the log and capture window FCP crashes. When she starts up FCP they are greeted with the DV NTSC Device is not connected message even if the camera is conected and on. Doing a re