Pagina unfolding of test
Respectful greeting
Install java2ee-1.4 and you can initiate the application server correctly, but when I use the URL http://localhost:8181 to unfold the pagina of test this unfolds in the internet explorer single target with five small cuadritos. It already verifies and the port is 8181 as it appears in the URL I thank for his aid
hereyedo
Hey buton,
The first three suggestions in this whitepaper will likely be useful to you in your application. Basically, you could use on-the-fly reporting to write your report directly to disk instead of keeping it in memory, and use the "Only Display Latest Results" and "Discard results when not required by the model" to lessen growth of the report in memory.
To complete your requirements about only seeing failed results, you could configure the report to only show failures by changing the Result FIltering expression in the report options dialog. The "Exclude Passed/Done/Skipped" option should have the desired effect. The finished report will still show the overall UUT status in the header of the report, so you'll be able to see whether the test passed or failed.
I hope it helps, and let us know if you have any further questions about it!
Daniel E.
TestStand Product Support Engineer
National Instruments
Similar Messages
-
Hi
When creating a report with navigation link or dynamic sort on the dashboard when you point with the mouse over the link ( not clicking it just standing on the value) it gives a "Results" tooltip in yellow box.
Is it possible to control this tooltip and to give another value instead of "Results" or can it be removed?
ThanksHi in fact is already use a customize template for my report
CSS in html header
<style type="text/css">
ul.icon-list {
margin: 0;
padding: 0;
list-style: none;
ul.icon-list li {
display: inline-block;
margin: 0;
padding: 0;
width: &P31_LABEL_WIDTH.em;
ul.icon-list li a img {
vertical-align: middle;
</style>
<!-- IE is broken -->
<!--[if IE]>
<style type="text/css">
ul.icon-list li {
display: inline;
</style>
<![endif]-->Icon List template for the report
in the span balise i have (onmouseover="ToolTip('#TOOLTIP#');">#LABEL#), not appears in the balise 'code'
<li class="dd">
<a href="#DERIVED$01#">
<img src="#ICON#" alt="#LABEL#" />
<span onmouseover="ToolTip('#TOOLTIP#');">#LABEL#</span>
</a>
</li>
<ul class="icon-list">
</ul>
<table>#PAGINATION#</table>I test the following javascript :
function ToolTip(texte) {
toolTip_enable(texte,this,texte);
}When the mouse is over the field i get well the tooltip value i'd like to have but it appears in the bottom of the page always in the same area.
could someone give me more info about 'toolTip_enable' function?
Thx in advance.
Celio
Edited by: Celio on 10-Feb-2011 04:00
Edited by: Celio on 10-Feb-2011 04:01
Edited by: Celio on 10-Feb-2011 04:03
Edited by: Celio on 10-Feb-2011 04:04 -
How to use a select field as a tooltip in a report
Dear,
i have a customize report based on the statement below
SELECT '#WORKSPACE_IMAGES#folder.GIF' icon , lower(a.application)label,(a.appli_acronym) acronym,(ap.app_server)host
FROM app_users ap, applications a
where a.appli_user= ap.app_user
and ap.app_server=:P31_LABELVALUE
and upper(a.application) like DECODE (:P31_SEARCH, NULL,'%', UPPER ('%' || :P31_SEARCH || '%'))
order by labelHow can i use the second field (a.appli_acronym) as tooltip in my report?
Thx in advance.
CelioHi in fact is already use a customize template for my report
CSS in html header
<style type="text/css">
ul.icon-list {
margin: 0;
padding: 0;
list-style: none;
ul.icon-list li {
display: inline-block;
margin: 0;
padding: 0;
width: &P31_LABEL_WIDTH.em;
ul.icon-list li a img {
vertical-align: middle;
</style>
<!-- IE is broken -->
<!--[if IE]>
<style type="text/css">
ul.icon-list li {
display: inline;
</style>
<![endif]-->Icon List template for the report
in the span balise i have (onmouseover="ToolTip('#TOOLTIP#');">#LABEL#), not appears in the balise 'code'
<li class="dd">
<a href="#DERIVED$01#">
<img src="#ICON#" alt="#LABEL#" />
<span onmouseover="ToolTip('#TOOLTIP#');">#LABEL#</span>
</a>
</li>
<ul class="icon-list">
</ul>
<table>#PAGINATION#</table>I test the following javascript :
function ToolTip(texte) {
toolTip_enable(texte,this,texte);
}When the mouse is over the field i get well the tooltip value i'd like to have but it appears in the bottom of the page always in the same area.
could someone give me more info about 'toolTip_enable' function?
Thx in advance.
Celio
Edited by: Celio on 10-Feb-2011 04:00
Edited by: Celio on 10-Feb-2011 04:01
Edited by: Celio on 10-Feb-2011 04:03
Edited by: Celio on 10-Feb-2011 04:04 -
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. -
Number of currently displayed rows in report with pagination?
Maybe I'm thinking to complicated, but ...
In my report I use the HTMLDB_ITEM.CHECKBOX function in order to display a checkbox for each row:
HTMLDB_ITEM.CHECKBOX(1,"ID",NULL,:P311_ASSIGNED,':') " "
Some of the checkboxes are selected depending on whether there is an entry for them in a database table.
As the report returns hundreds of rows, I use pagination (e.g. 15 rows per page).
After checking/unchecking the checkboxes and submitting the page by clicking the save button, I want to do the following: For each row CURRENTLY DISPLAYED on the screen (1) check, whether its checkbox is currently checked or not (2a) If it is checked and there is not yet an entry -> add row to the db table (2b) If it is unchecked and there is an entry in the db table -> remove row from db table.
How can I, on the server side, find out which rows (row ids) are currently displayed (using pagination), so that I check each of the currently displayed row ids for their existence in the database table? Is there any item stored on the server side, which tells me the row number of the first row currently displayed? Is there an item I can refer to, which tells me the amount of rows, which are displayed on one page?
Your help would be very much appreciated!
KonradHi Konrad,
I will jump in. :-) Just have a few minutes before a meeting.
I think you don't have to make it that complicated, where you have to know the current pagination.
1) Your HTMLDB_ITEM.CHECKBOX has to contain as checked value #ROWNUM# as the row selector would do it.
2) You have to create a hidden item where you store your customer id
3) create another hidden item where you store if the customer has already the assignment
4) In your process you are now able to loop through your arrays.
DECLARE
vRowNumber BINARY_INTEGER;
vFound BOOLEAN;
BEGIN
-- insert new event assignments
FOR ii IN 1 .. WWV_Flow.g_f01.COUNT -- your checkbox
LOOP
vRowNumber := WWV_Flow.g_f01(ii);
-- no assignment yet?
IF WWV_Flow.g_f03(vRowNumber) IS NULL -- your hidden field where you store if you have an assmnt
THEN
INSERT INTO xxx VALUES (WWV_Flow.g_f02(vRowNumber)); -- your customer id
END IF;
END LOOP;
-- delete old event assignments
FOR ii IN 1 .. WWV_Flow.g_f03.COUNT -- your hidden field where you store if you have an assmnt
LOOP
-- only if the event was already assigned
IF WWV_Flow.g_f03(ii) IS NOT NULL
THEN
vFound := FALSE;
FOR jj IN 1 .. WWV_Flow.g_f01.COUNT -- your checkbox
LOOP
-- is the event still checked?
IF WWV_Flow.g_f01(jj) = ii
THEN
vFound := TRUE;
EXIT;
END IF;
END LOOP;
IF NOT vFound
THEN
DELETE xxx WHERE CUSTOMER_ID = WWV_Flow.g_f02(ii);
END IF;
END IF;
END LOOP;
END LOOP;Haven't tested the code, but I think it should show the idea.
Hope that helps
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com -
Custom pagination for APEX 4.2 interactive report using Page Zero
Hi,
I want to implement an «Custom pagination for APEX 4.2 interactive report» using a «page zero».
I recently migrate from Apex 3.1 to Apex 4.2 and my «Custom pagination for APEX 3.1 interactive report» using a «page zero» is not working any more.
So now I try to adapt an excellent example of Jari Laine for 4.0 but using a page zero.
I put the code JavaScript to Page zero but I must create an dynamic action to fire only for an interactive report region.
It’s a good idea?
Thank youThought I would try once more with my DatePicker question.
On the Apex.Oracle.Com website I have created a 1 page application that has an Interactive Report.
[url http://apex.oracle.com/pls/apex/f?p=15655:1]
user = 'test'
password = 'test'
I have 2 questions :
(1) In IE7, press 'Actions', 'Filter'. On the Column dropdown list, select 'Order Timestamp'.
Notice the prompt icon to the right of the 'expression'. This should change to the Datepicker, but in IE7 it does not. Try the samething in Firefox or Chrome and the Datepicker will appear.
Is this a BUG, or does Apex 4.02 not support IE7 ?
(2) In Firefox or Chrome, where you can now see the Datepicker, you will notice that it is the new style picker, not the old style ( called 'classic' ). I want to change it so that it shows the 'classic' datepicker not the new, but cannot see how to do it, if indeed you actually can.
I would really appreciate it if someone could take a look and let me know if I am going mad, or if we need to get all our users onto IE8. We have now gone live with Apex 4.02 and need to resolve these issues.
Thanks in advance.
Edited by: DooRon on 10-Mar-2011 05:13 -
Mixing of interactive report and classic report fails the RESET PAGINATION process.
I have a tab page where i got 3 different reports REPORT_A (classic), REPORT_B(interactive) and REPORT_C (CLASSIC) in the same alphabetic order. I have a reset pagination page process which will always fire (without any condition) when you visit the page via tab.
The reset pagination process which exists in the before header stage is firing but not resetting the interactive report. It does affect the subsequent classic report REPORT_C as well. The REPORT_A would reset pagination fine since it exists before the interactive report. Is this a know bug in apex?
I created a test demo application with exact steps to reproduce the problem. The steps are in the demo website itself.
http://apex.oracle.com/pls/apex/f?p=56638
U: testuser
P: password
Apex Version: 4.2.4.00.08
In my real application i would have a dropdownlist in the page based on which I would filter the data. The dropdownlist will have a corresponding after-submit branch which will handle the reset pagination & RIR absolutely fine. But when we visit the website through tab the above problem would crash the page.
I tried solutions like gReport.search('SEARCH') but that will fix only the interactive report, not the classic REPORT_C. That is just a hack anyway.
Any ideas.?Ramani_vadakadu wrote:
in classic report pagination need to be make it up max rows in APEX_SCHEMA(APEX_040200) itself. i was fixed this issue long back myself,but right now i don't remember which table! so please check the schema and track it.
This makes very little sense to me. Please explain this in detail. Are you advocating making changes to APEX metadata by executing DML on tables in the APEX_040200 schema? Doing so will leave your APEX instance in an unsupported an possibly inoperable state. -
Timing of Report (function body returning sql) w/ pagination
Hey -
Wondered if someone can provide some insight here...
I have a report that is dynamically created by calling a function that returns sql. Since it may return a few hundred results I have pagination turned on allowing the user to choose rows per page, and am showing X-Y with next/prev links.
Before displaying the report the user has to choose some criteria to narrow down the result set - I'm finding something that I think is a bit strange in that it takes more time for the page to render when zero results are found vs. 100's of results. If I run the function and take the sql it creates, I can return 0 rows in .2 seconds and 508 rows in .5 seconds so I think the sql itself is fine. Other than debugging timings, how can I find out what is taking so long?
Debug for 0 results:
0.07: Region: Program Forecast (viewing SAVED values)
5.14: show report
5.15: determine column headings
5.15: parse query as: ####
5.15: print column headings
5.15: rows loop: 15 row(s)
10.32: Computation point: AFTER_BOX_BODY
Debug for 508 results (in chunks of 15):
0.07: Region: Program Forecast (viewing SAVED values)
2.76: show report
2.76: determine column headings
2.77: parse query as: ####
2.94: print column headings
2.94: rows loop: 15 row(s)
6.52: Computation point: AFTER_BOX_BODY
So it took only 6.5 seconds to pull 508 rows, look at my pagination and pull the first x rows, but 10.32 seconds to pull 0 rows and show me the no data found message. Even stranger is that in the 0 rows result it looped and took 5 seconds before it hit the next point (5 seconds doing what??)
Any ideas? I'm a little baffled here...I guess the next step is to trace it but I wanted to see if anyone had any ideas in the interim.Where is the embarrassed icon?
After painstakingly copying over each item to a new page to test, I figured out performance starting sucking big time once I put a button out there that apparently had a less than optimal exists clause in it.
D'oh! -
Empty report with pagination, rows not displayed
Dear HTML DB Team,
We have in our reports the next error: An empty report with pagination appears , no rows not displayed
The test case to reproduce the error:
1. Create "SQL report" with next report attributes in "Layout and Pagination"
a. Row ranges 1-15 16-30 in select list (with pagination)
b. Number of Rows : 15
c. Number of Rows (Item): empty
d. Max Row Count: empty
2. Fill the table on which the report is based with 17 rows
3. Go to the 2nd page of the report , pagination rows 16-17 of 17
4. Remove 2 rows from the table, refresh report
5, The pagination shows now 1 - 15 of 15 rows
- no rows displayed
- no "previous button" ( only )
- no way to get the rows displayed, except logging out and in again
Any suggestions?
ErikHello,
i encountered the same problem while developing in HTMLDB.
In application builder, i select application Application 106, then click on items, then click next ( the application has 22 global items). Now i want to take a look at the global items in application 105 (there are only 5). In the menu i click Builder - Application 106, select application 105 from Available Applications, click Go and Items. It shows no rows, but says that is displaying rows 1-5, and offers a Next button. No way to see/modify the items unless make a new session or go back to Application 106, Click Previous to see the first page of global items and then again switch to Appication 105 or click to the next button and then manually set pg_min_row=1 in URL.
One more question - is this forum the right place to report bug suspicions, or is there some other special place for that?
Best regards,
Andres -
Problem in tabular form based on dynamic view and pagination
Hi All,
I have a manual tabular form based on a dynamic view. The view fetches the records based on search criteria given by the user in all cases. But this view fetches ALL records when user clicks on pagination, without considering the search criteria. This is the problem I am facing.
I am doing the following:
Since tabular form does not support pl/sql function returning query, I cannot use a table directly. I need my results based on search criteria selected by user. Hence I created a dynamic view and used a "INSTEAD OF UPDATE" trigger to update the table.
I use a set bind variables procedure, on load before header for setting the variables.
This view fetches the correct data based on user search always. It creates a problem only in one situation, when using pagination in the report.
The example can be found at:
http://apex.oracle.com/pls/otn/f?p=19399:1:
username = [email protected]
pwd = kishore
Here if "manager name" is entered as test, we get 5 records in "Summary of requests" report and 5 records in "Inactive Requests" report. When user clicks on Pagination in any of the reports, ALL the 7 records get fetched in "Summary of Requests" and 6 records in "Inactive Requests". How can I overcome this problem?? The report must consider the search variables even when pagination occurs.
Is this because, the inbuilt "html_PPR_Report_Page" executes the region query once again by considering all search variables as NULL?
Backend Code is at:
http://apex.oracle.com/pls/otn/
workspace: sekhar.nooney
Username :[email protected]
pwd: kishore
application id = 19399
My region code is something like:
select *
from regadm_request_v
where access_type = :F110_REGADM
and status <> 'INACTIVE'
order by request_id
My view code is:
CREATE OR REPLACE VIEW REGADM_REQUEST_V
AS
SELECT *
FROM REGREGOWNER.REGADM_REQUEST
WHERE upper(employee_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_NAME),'%')||'%'
AND upper(manager_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_NAME),'%')||'%'
AND upper(employee_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_SUNET_ID),'%')||'%'
AND upper(manager_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_SUNET_ID),'%')||'%'
AND upper(request_date) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_REQUEST_DATE),'%')||'%'
AND upper(USAGE_AGREEMENT_RECVD) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD,'~!@',NULL,REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD)),'%')||'%'
AND upper(STATUS) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_STATUS,'~!@',NULL,REGADM_REQUEST_PKG.GET_STATUS)),'%')||'%'
AND upper(REQUEST_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_REQUEST_APPROVED,'~!@',NULL,REGADM_REQUEST_PKG.GET_REQUEST_APPROVED)),'%')||'%'
AND upper(nvl(APPROVAL_DATE,sysdate)) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_APPROVED_DATE),'%')||'%'
AND upper(APRVL_REQUEST_SENT) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS,'~!@',NULL,REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS)),'%')||'%'
AND upper(NOTIFY_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION,'~!@',NULL,REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION)),'%')||'%'
I would be glad for any suggestions.
Andy/Varad any ideas? You both helped me a lot on my problems for the same application that I had faced before in More Problems in Tabular form - Please give me suggestions.
Thanks,
SumanaHi Andy,
The view and the package for setting bind variables work properly in my entire application other than the pagination. A pity that I came across this only now :(
I have used this same method for holding variables in another application before, where I needed to print to PDF. I used this approach in the other application because my queries were not within the APEX character limit specified for the "SQL Query of Report Query shared component".
In this application, I initially had to fetch values from 2 tables and update the 2 tables. Updateable form works only with one table right? Hence I had created a view. Later the design got changed to include search and instead of changing the application design I just changed the view then. Still later, my clients merged the 2 tables. Once again I had just changed my view.
Now, I wanted to know if any method was available for the pagination issue (using the view itself). Hence I posted this.
But as you suggested, I think it is better to change the page design quickly (as it would be much easier).
If I change the region query to use the table and the APEX bind parameters in the where clause as:
SELECT *
FROM REGADM_REQUEST
WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
I also changed the ApplyMRU to refer to the table.
Here the pagination issue is resolved. But here the "last Update By" and "Last Update Date" columns do not get updated with "SYSDATE" and "v(APP_USER)" values, when update takes place. Even if I make the columns as readonly text field, I am not sure how I can ensure that SYSDATE and v('APP_uSER') can be passed to the columns. Any way I can ensure this? Please have a look at the issue here: http://apex.oracle.com/pls/otn/f?p=19399:1:
I have currently resolved the "last update" column issue by modifying my view as:
CREATE OR REPLACE VIEW REGADM_REQUEST_V
AS
SELECT *
FROM REGADM_REQUEST
I modified my region query to use APEX bind parameters itself as:
SELECT *
FROM REGADM_REQUEST_V
WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
And I use the "INSTEAD OF UPDATE" trigger that I had initially written for update. The code is:
CREATE OR REPLACE TRIGGER REGADM_REQUEST_UPD_TRG
INSTEAD OF UPDATE
ON REGADM_REQUEST_V
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
UPDATE REGREGOWNER.REGADM_REQUEST
SET MANAGER_EMAIL = :NEW.MANAGER_EMAIL
, EMPLOYEE_EMAIL = :NEW.EMPLOYEE_EMAIL
, STATUS_UPDATE_DATETIME = SYSDATE
, USER_UPDATE_ID = (SELECT v('APP_USER') FROM DUAL)
WHERE REQUEST_ID = :OLD.REQUEST_ID;
END;
Please let me know how I can resolve the "last update" column issue using the table itself. (Just for my learning)
Thanks,
Sumana -
This issue is related to pagination in ssrs.I want to handle pagination using stored procedure. I have created below sp and would like to know that how can i set value for parameter @pageNum. so that every time i change page in report viewer value
get increase with +1(like 1,2,3,4,5.....).
create proc [dbo].[Test_paging]
@pageNum int, --page no
@pageSize int---how many rows
as
; with test
as
SELECT DISTINCT row_number() over(order by column name),
List of the columns
from table name
select * from TBL_CMBLY
WHERE RowNum BETWEEN (@pageNum - 1) * @pageSize + 1
AND @pageNum * @pageSize
order by rownumHi Tejaskumar,
As you may know, per the RDL specification, accessing the current page number from within the report body is not supported in Reporting Services. Using custom code to work around this limitation is also not supported, because it would rely on intrinsic expression
evaluation order and pagination/rendering order which is not documented.
One possible workaround is calculating the page number by yourself to display the page number in the report body. Suppose the report has 100 records, and one page has 10 row, then we can refer to the steps below:
Add another column with the expression like below in the tablix, then hide the column:
=ceiling(Rownumber("DataSet1") / 10)
Drag a table right of the current tablix, and delete the tablix header, second and third columns.
Right-right the Details group to add Page Breaks with the “Between each instance of a group” option.
Insert the expression below in the textbox:
=ceiling(Rownumber("DataSet1") / 1)
Then use the expression below to control the row visibility:
=iif(ceiling (Rownumber("DataSet1") / 1)>reportitems!Textbox6.Value,true,false)
Note that the Textbox6 is the name of the textbox which contains the value: =ceiling(Rownumber("DataSet1") / 10)
Besides, we can use the expression below to manually add page break with 10 rows for each page in the tablix:
=ceiling(Rownumber("DataSet1") / 10)
The following similar thread is for your reference:
http://social.msdn.microsoft.com/forums/sqlserver/en-US/ab9c18bc-ee37-45a2-a52d-628c12d08b33/ssrspagination-on-report-body
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Hello there. As I have sought out a reasonable solution for paging nagivation and compared designs such as Google's search result paging to designs such as this forum's paging navigation, I have decided to go with this forum's design which I found somewhat better and more of a challenge. I did however, step it up a notch and attempt to improve it by acheiving a constant page group return size (with the exception of undersized page group lists and end groups that don't span the default page group size). This is one behaviour I noticed this forum's paging lacking. You can notice it when you are first starting your paging through the forum, the number of pages listed varies each time you page forward/backward until you reach a stable point deeper into the pages.
This paging utility, however, maintains a constant page group list size which may be preferred when looking to fit the navigator into a constrained area.
Anyhow, the following is a complete working example:
package web.util;
import java.util.ArrayList;
import java.util.List;
* @author javious
public class Pagination {
/** Creates a new instance of Pagination */
public Pagination() {
* @param totalItems is the total of all items to be paged.
* @param currentPage is a page from the returning list to be currently displayed.
* @param defaultCursorPosition (zero based) is the usual position within the
* returning list in which
* we want to display the current page. Should the current page be less than
* this position, then this parameter gets overridden with the page's position.
* Should the current page be greater than the final(of the last page group)
* page position minus the preferred page position, then this
* parameter gets overridden with the page's position.
* @return List of page numbers in relation to the supplied parameters.
public static List<Integer> getList(int totalItems,
int currentPage,
int resultPageSize,
int pageGroupSize,
int defaultCursorPosition)
List<Integer> pageList = new ArrayList<Integer>();
// first obtain the first item index of the absolute last page of
// all known records.
int finalPageItemStartIndex = (totalItems - totalItems % resultPageSize);
if(totalItems % resultPageSize == 0)
finalPageItemStartIndex-=resultPageSize;
// Now obtain the final page index
int finalPage = 0;
if(finalPageItemStartIndex > 0)
finalPage = 1+(int)Math.ceil((double)finalPageItemStartIndex/resultPageSize);
int offset = pageGroupSize;
if(currentPage > defaultCursorPosition)
offset -= defaultCursorPosition;
else
offset -= (int)Math.min(pageGroupSize, currentPage);
int endPage = Math.min(finalPage, currentPage + offset);
int startPage = 0;
if(currentPage > defaultCursorPosition && finalPage >= endPage)
startPage = Math.max(1,endPage - pageGroupSize + 1);
pageList.add(0);
for(int i=startPage;i<endPage;i++)
pageList.add(i);
return pageList;
}and the initial servlet
package web;
import java.io.*;
import java.net.*;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.*;
import javax.servlet.http.*;
import web.util.Pagination;
* @author javious
* @version
public class PaginationTest extends HttpServlet {
private static final int testItems[][] = {new int[210],
new int[133],
new int[7], // good test for within boundaries
new int[111],
new int[10], // good test of matching group size.
new int[20] // good test of divisible
static {
for(int i=0;i<testItems.length;i++)
for(int j=0;j<testItems.length;j++){
testItems[i][j] = (int)Math.ceil(Math.random()*10000);
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
int resultPageSize = 10;
int pageGroupSize = 10;
int defaultPageCursorPosition = 3;
response.setContentType("text/html;charset=UTF-8");
// add parent total so jsp can list links for them.
request.setAttribute("parentTotal", testItems.length);
String sParentIndx = request.getParameter("parentId");
String sCurrentPage = request.getParameter("itemPg");
int parentIndex = (sParentIndx != null ? Integer.parseInt(sParentIndx) : 0);
int currentPage = (sCurrentPage != null ? Integer.parseInt(sCurrentPage) : 0);
request.setAttribute("parentId", parentIndex);
request.setAttribute("itemPg", currentPage);
int targetItems[] = testItems[parentIndex];
int totalItems = targetItems.length;
int startIndex = currentPage*resultPageSize;
request.setAttribute("pageStart", startIndex+1);
int maxResultIndex = Math.min(totalItems, startIndex + resultPageSize);
List pageItems = new ArrayList();
for(int i=currentPage*resultPageSize;i<maxResultIndex;i++)
pageItems.add(targetItems[i]);
request.setAttribute("pageItems", pageItems);
// add totalPages so jsp can determine whether or not
// to show "previous" link
int totalPages = totalItems/resultPageSize; // 2 pages = 0 to 1
if(totalItems % resultPageSize > 0)
totalPages++;
request.setAttribute("totalPages", totalPages);
// add this so jsp can tell when to add "..."
request.setAttribute("defaultPageCursorPosition", defaultPageCursorPosition);
List pageList = Pagination.getList(totalItems, currentPage,
resultPageSize, pageGroupSize, defaultPageCursorPosition);
request.setAttribute("pageList", pageList);
request.getRequestDispatcher("pagination_test.jsp").forward(request,response);
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
public String getServletInfo() {
return "Short description";
and now for the nagivator portion of your JSP/JSTL
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<STYLE type="text/css">
.pagingLink {text-decoration: none}
</STYLE>
</head>
<body>
<h1>Parent Lists</h1>
<c:forEach begin="0" end="${parentTotal-1}" var="indx" varStatus="loopStat">
<c:choose>
<c:when test="${parentId == indx}">
<b>${loopStat.count}</b>
</c:when>
<c:otherwise>
<a href="PaginationTest?parentId=${indx}">${loopStat.count}</a>
</c:otherwise>
</c:choose>
</c:forEach>
<h1>Items</h1>
<ol start="${pageStart}">
<c:forEach var="item" items="${pageItems}" varStatus="loopStat">
<li>${item}
</c:forEach>
</ol>
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<c:if test="${itemPg-1 >= 0}">
<td><a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${itemPg-1}"><<</a>
</td>
</c:if>
<%-- Loop through paging numbers list --%>
<c:forEach var="pg" items="${pageList}" varStatus="loopStat">
<c:if test="${!(loopStat.index eq 0 and loopStat.last)}">
<td>
<c:if test="${loopStat.count > 1}">
|
</c:if>
<c:choose>
<c:when test="${itemPg == pg}">
<b>${pg+1}</b>
</c:when>
<c:otherwise>
<a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${pg}">${pg+1}</a>
<c:if test="${loopStat.count == 1 && itemPg > defaultPageCursorPosition}">...</c:if>
</c:otherwise>
</c:choose>
</td>
</c:if>
</c:forEach>
<c:if test="${itemPg+1 < totalPages}">
<td><a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${itemPg+1}">>></a>
</td>
</c:if>
</tr>
</table>
</body>
</html>hi
I m giving a code for pagination. this is for displaying 5 records per page i think it may help ful to you
<html>
<body>
<link href="Stylesheet/style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="TableSort.js">
</script>
<br>
<br>
<center><H2> Student Details </H2></center>
<%
int loop_var=Integer.parseInt(request.getParameter("i"));
Vector vecResults=new Vector();
// store the records in vector
vecResults=dataAccessLayer.readObjects("QueryToAllStudents");
String strSortable="sortable";
int rec=vecResults.size();
int i=0,roll_number;
HashMap hmRecord;
if (rec==0)
roll_number=1;
else
hmRecord = (HashMap)vecResults.elementAt(rec-1);
roll_number=Integer.parseInt((String )hmRecord.get("std_rno"))+1;
session.setAttribute("roll_number",roll_number+"");
if (rec==0)
out.println("There are no records in database please enter");
%>
<br>
Add  
<%
else
%>
<table border="1" width="70%" align="center" id="studentdetails" class=<%=strSortable%>>
<tr>
<th bgcolor="PINK" sort="true" align=center>Roll No</th>
<th bgcolor="PINK" sort="true" align=center>Name </th>
<th bgcolor="PINK" sort="true" align=center>Date Of Birth </th>
<th bgcolor="PINK" sort="true" align=center>Subject1 </th>
<th bgcolor="PINK" sort="true" align=center>Subject2 </th>
<th bgcolor="PINK" sort="true" align=center>Subject3 </th>
<th bgcolor="PINK" sort="true" align=center>Total </th>
<th bgcolor="PINK" sort="true" align=center>Modby </th>
</tr>
<%
String s;
while (i<5 && loop_var<rec)
hmRecord = (HashMap)vecResults.elementAt(loop_var);
s=((String )hmRecord.get("std_dob")).substring(1,10);
%>
<tr>
<td><center><%=hmRecord.get("std_rno")%></center></td>
<td><center><%=hmRecord.get("std_name")%></center></td>
<td><center><%=s%></center></td>
<td><center><%=hmRecord.get("std_sub1")%></center></td>
<td><center><%=hmRecord.get("std_sub2")%></center></td>
<td><center><%=hmRecord.get("std_sub3")%></center></td>
<td><center><%=hmRecord.get("std_tot")%></center></td>
<td><center><%=hmRecord.get("std_modby")%></center></td>
</tr>
<%
loop_var++;
i++;
%>
</table>
<center>
<br>
<br>
<%
if (loop_var>=11)
%>
<a href="List.jsp?i=<%=(((loop_var/5)*5)-5)%>">Prev  |</a>
<% }
else
%>
<a href="List.jsp?i=<%=0%>">Prev  |</a>
<% }
int j=1;
for (i=0;i<rec/5;i++,j++)
%>
<a href="List.jsp?i=<%=(i*5)%>"><%=j%> |</a>
<%
if (rec%5!=0)
%>
<a href="List.jsp?i=<%=(i*5)%>"><%=j%></a>
<%
if (loop_var<rec)
%>
<a href="List.jsp?i=<%=loop_var%>">|   Next</a>
<% }
else
if (rec%5==0)
%>
<a href="List.jsp?i=<%=(loop_var-5)%>">|   Next</a>
<% }
else
%>
<a href="List.jsp?i=<%=(loop_var-rec%5)%>">|   Next</a>
<%
%>
</center>
<br>
<br>
Add  
Edit / Delete  
List
<%
%>
</body>
</html> -
Hi,
We have a table which is showing 10 records at a time. We have a single selection associated with this table. On page load, 10 records will be displayed and the first record will be selected.
When i click on say 4th record, we are doing firePartialAction(RuleSelect) and capturing that event. This selection of 4th records works fine i.e. when i select 4th record, page starts loading and once the page loads 4th record is selected.
Now suppose if i Click on NEXT(10-20) records. Next 10 records(11-20) are displayed and 11th record which will be the first record of the second page will get selected once that event(GOTO) ends. We are capturing this event as well.
Now if on the second page i try to select some other record, say 15th record i.e 5th record of the second page,the page starts loading and it navigates to the last set of record of the table ie. If total number of records are 35 in that table, on selection of 15th record, it will display me records from 30-35 instead of displaying 15th record as selected.
My ques is when the firePartialAction(RuleSelect) works fine on the First page of the table i.e. for records(1-10), then why on selection of 15th record after pagination, its showing me the last set of records.
Please let me, how i can fix this issue.
I tried putting vo.reset() in some of the places, but its showing me some absurd output.
Thanks in advance
Saurabhhi,
The table associated with RuleHeaderDetails is causing the Issue. PFB the code which gets fired on selection of RadioButton on the table.
Controller Code
===============
if ("RuleSelect".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
numRuleID = (Number)am.invokeMethod("getSelectedRule");
if("N".equals(ChangesCheck))
ChangesCheck = (String)am.invokeMethod("CheckPriorityChanges");
numRuleID = (Number)am.invokeMethod("getSelectHeaderRowEvent");
if (!(numRuleID.intValue() == 0))
Serializable[] parameters = { numRuleID.toString() };
String strCount = (String)am.invokeMethod("initHeaderDetails", parameters);
AM Code
=======
public String CheckPriorityChanges()
OAViewObject vo = (OAViewObject)findViewObject("RuleHdrDetailsVO1");
if(!vo.isPreparedForExecution())
return "N";
Row rowHdr1 = vo.first();
int iTest = 0;
String returnStatus = "N";
Number numPriorityValue = new Number(0);
Number numRuleId = null;
while(rowHdr1 != null)
numPriorityValue = (Number)rowHdr1.getAttribute("RulePriority");
numRuleId = (Number)rowHdr1.getAttribute("RuleId");
if(numPriorityValue == null)
numPriorityValue = new Number(0);
OADBTransaction txn = (OADBTransaction)getDBTransaction();
CallableStatement cs = txn.createCallableStatement("Test", 1);
String procCall = "begin utilities_pkg.check_rule_priority_p("+
"p_out_v_return_status => :1,"+
"p_in_n_rule_id => :2,"+
"p_in_n_rule_priority => :3); end;";
cs = txn.createCallableStatement(procCall, 1);
try
cs.registerOutParameter(1,Types.VARCHAR);
cs.setInt(2,numRuleId.intValue());
cs.setInt(3,numPriorityValue.intValue());
cs.execute();
returnStatus = cs.getString(1);
catch(Exception excp)
System.out.println("Exception - "+excp.getMessage());
if("Y".equals(returnStatus))
break;
vo.setCurrentRow(rowHdr1);
rowHdr1 = vo.next();
vo.reset();
return returnStatus;
public Number getSelectHeaderRowEvent()
Number ReturnValue = new Number(0);
OAViewObject vo = (OAViewObject)findViewObject("RuleHdrDetailsVO1");
OARow row = (OARow)vo.getFirstFilteredRow("Select","Y");
if (row == null)
RuleDefnDetailsVOImpl vo2 = getRuleDefnDetailsVO1();
vo2.setWhereClauseParams(null);
vo2.setWhereClauseParam(0,"0");
vo2.setMaxFetchSize(-1);
vo2.executeQuery();
return ReturnValue;
if (row != null)
System.out.println("In here");
vo.setCurrentRow(row);
return ReturnValue;
} // getSelectHeaderRowEvent()
public String initHeaderDetails(String RuleID)
String strRuleStatus = "";
RuleHdrPopUpVOImpl Hdrvo = getRuleHdrPopUpVO1();
Hdrvo.setWhereClauseParams(null);
Hdrvo.setWhereClauseParam(0,RuleID);
Hdrvo.setMaxFetchSize(-1);
Hdrvo.executeQuery();
OARow hdrRow = (OARow)Hdrvo.first();
gstrRuleName = (String)hdrRow.getAttribute("RuleName");
OAViewObject voRulHdr = (OAViewObject)findViewObject("RuleHdrDetailsVO1");
OARow rowRulHdr = (OARow)voRulHdr.first();
int iCount = 1;
while (!(rowRulHdr.getAttribute("RuleId").equals(RuleID)))
iCount++;
rowRulHdr = (OARow)voRulHdr.next();
voRulHdr.setCurrentRow(rowRulHdr);
voRulHdr.reset();
return strCount;
Thanks
Saurabh -
Pagination problem, help needed to finish it
Hi friends,
I am in need to use pagination in my Web Application, since i have a tons of values to display as a report. I develop a pagination logic, tested it seperately and it works fine.When i try to implement it to current project it works, but no result was displayed as it displayed in testing..
Here is the file i tested seperately..
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.rajk.javacode.servlets.dbmodel"%>
<%
int count=0;
int userid = 0;
String g = null;
dbmodel db=new dbmodel();
Statement ps = null;
ResultSet rs = null;
db.connect();
String SQL = "select * from tbl_rmadetails";
ps=db.con.createStatement();
rs=ps.executeQuery(SQL);
rs.last();
count= rs.getRow();
rs.beforeFirst();
int currentrs;
int pagecount=(count/2);
if((pagecount*2)+1>=count)
pagecount++;
out.println("<table width=363 height=20 align=center border=0 cellpadding=0 cellspacing=0><tr><td>");
for(int i=1;i<pagecount;i++)
out.println("<font face=verdana size=1><a href=pagination.jsp?pagenum="+ i +"&userid="+ userid +">["+ i +"]</a></font>");
String pagenum=request.getParameter("pagenum");
if(pagenum==null)
out.println("<br><strong><font face=verdana size=1 color=white>Page 1 of " + (pagecount-1) +"</font></strong>");
currentrs=0;
else
out.println("<br><strong><font face=verdana size=1 color=white>Page " + pagenum + " of " + (pagecount-1) + "</font></strong>");
pagecount=Integer.parseInt(pagenum);
currentrs=(2*(pagecount-1));
out.println("</td></tr></table>");
//messageboard
String sql="select * from tbl_rmadetails order by date LIMIT " + currentrs + ",2";
rs=ps.executeQuery(sql);
while(rs.next())
%>
<br>
<table width="363" height="64" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
</td>
<td width="126" height="19" align="center" valign="top"><font face="verdana" size="1"><strong><%=rs.getString("serial_no")%></strong></font></td>
<td width="126" height="19" align="center" valign="top"><font face="verdana" size="1"><strong><%=rs.getString("status")%></strong></font></td>
</tr>
</table></td>
</tr>
</table>
<%
rs.close();
%> And here is the file in which i want to implement the pagination..
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.rajk.javacode.servlets.dbmodel"%>
<%
int x1=0;
int userid = 0;
int count = 0;
String raj=request.getParameter("q");
String temp=null;
String SQL = null;
String SQLX = null;
int currentrs;
try
dbmodel db=new dbmodel();
Statement ps = null;
ResultSet rs = null;
db.connect();
if(raj.equals("All Vendor"))
SQL = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.status='STS'";
else
SQL = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.status='STS' AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.vendor_id='"+raj+"'";
ps=db.con.createStatement();
rs=ps.executeQuery(SQL);
rs.last();
count= rs.getRow();
rs.beforeFirst();
rs.close();
int pagecount=(count/6)+1;
if((pagecount*6)+1>=count)
pagecount++;
//out.print(count);
%>
<%
for(int i=1;i<pagecount;i++)
out.println("<font face=verdana size=1><a href=http://localhost:8080/rmanew/sendtovendor.jsp?pagenum="+ i +"&userid="+ userid +">["+ i +"]</a></font>");
String pagenum=request.getParameter("pagenum");
if(pagenum==null)
out.println("<br><strong><font face=verdana size=1 color=white>Page 1 of " + (pagecount-1) +"</font></strong>");
currentrs=0;
else
out.println("<br><strong><font face=verdana size=1 color=white>Page " + pagenum + " of " + (pagecount-1) + "</font></strong>");
pagecount=Integer.parseInt(pagenum);
currentrs=(6*(pagecount-1));
if(raj.equals("All Vendor"))
SQLX = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.status='STS' LIMIT"+currentrs+",6";
else
SQLX = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.status='STS' AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.vendor_id='"+raj+"' LIMIT"+currentrs+",6";
rs=ps.executeQuery(SQLX);
if(rs!=null)
while(rs.next())
%>
<link rel="stylesheet" type="text/css" href="chromejs/stvcss.css" />
<table width="100%" border="0">
<tr bgcolor="#0066CC">
<td align="center"><span class="style2">Date</span></td>
<td align="center" class="style2">Product Details</td>
<td align="center" class="style2">Serial No</td>
<td align="center" class="style2">Fault Desc</td>
<td align="center" class="style2">Customer Name</td>
<td align="center" class="style2">Vendor Name</td>
<tr>
<tr bgcolor="#CCCCCC">
<td align="center"><%=rs.getDate("date")%></td>
<td align="center"><%=rs.getString("item_description")%></td>
<td align="center"><%=rs.getString("serial_no")%></td>
<td align="center"><%=rs.getString("fault_desc")%></td>
<td align="center"><%=rs.getString("customer_name")%></td>
<td align="center"><%=rs.getString("vendor_name")%></td>
</tr>
</table>
<%
else
out.println("Result Set is empty");
catch(Exception e)
System.out.println("Error: " + e);
response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
%>The output i got when i ran this page is..
[1]
And no records displayed matching the query, but there is a lot of datas in DB as a result of the queries i mentioned here..
Please help me friends...Debug your code. Check what happens and what happens not.
You could make it much easier if you wrote Java code in Java classes rather than JSP files. Now it's one big heap of mingled -and thus hard to maintain/test/reuse- code. -
Does Acrobat Pro 9 support "page-break-before" CSS tag? ie Pagination issues
Hey there
Converting a whole stack of html files to PDF and having some pagination issues. Titles not staying with images and tables getting chopped in half by page breaks etc.
Thought i could solve it by using carefully placed "page-break-before:always" tags where i wanted the page break. Works as expected in Safari when i go to print but not when i "File:Create PDF: From File" in Acrobat Pro. They get ignored.
Here's how they should work:
http://www.w3.org/TR/CSS21/page.html#x3
This is a major hassle. I've got over 600 webpages to convert to PDF's and manually entering <br> to force items onto the next page is getting old.
Here's some sample html, paste it into a file, save, open it in Safari and then go to print. It should print 7 pages. Open it in Acrobat Pro 9.1.0 and you get one page.
<body>
test0
<p style="page-break-before: always">
test
<p style="page-break-before: always">
test1
<p style="page-break-before: always">
test2
<p style="page-break-before: always">
test3
<p style="page-break-before: always">
test4
<p style="page-break-before: always">
</body>
The really nice thing is this would be so useful. You can attach the tag (page-break-before:avoid) to a Caption style and always be assured that it will stay with a following graphic when you print the webpage. Or use it to make sure a table doesn't get cut in half.
http://reference.sitepoint.com/css/page-break-after
http://reference.sitepoint.com/css/page-break-before
Any hints would be great
tia
JeremyNope. Did the </br> thing.
Cost me some serious cash. Very annoying.
I haven't tried it with Safari 5. Acrobat allowed me set page margins, something that Safari 4 didn't allow (didn't support margin css tags). But acrobat didn't support the pagination and Safari 4 did.
Like i said annoying
I'll see if Safari 5 supports the print margins css tags.
I'll prob get asked to do this again so would like to sort it out
Jeremy
Maybe you are looking for
-
ITunes deleted all playlists and purchases
Help! The other day I closed my iTunes program and it was working perfectly. I came back a few minutes later and re-opened it, only to find that all my playlists, purchases, everything had been deleted! All that is left is a library of songs about 3
-
Required Config and testing Docs for cash management/cash forecasting
Hi All, My client need to implement cash management/cash forecasting .. Can anyone send the details Required Config and testing Docs for the same as earlier i have not worked in this area.. Thanks in advance... Regards, Sandip
-
How to migrate lion to other mac - free
I have downloaded lion to my imac and want to download to my macbook. I understand the migration is free.
-
REP-0736: There exist uncompiled program unit(s).
Hi All, I have a custom report, it contains two libraries FARSV and FADOLIF, When I compile it from FA_TOP, it compiles successfully onto the server but when I compile it from Custom_Top, it gives errror REP-0736: There exist uncompiled program unit(
-
After update to 8.1, apps won't open.
After updating to windows 8.1 single language i have a problem in opening the tiles of the start sreen.When i click on a tile just a blank screen appears and again returns to the start sreeen.But when i move my pointer to the top left corner it sho