How to load only first set of rows only in pagination of interactive report
Hi all,
Iam using 3.2 x and database 10g.
I have created interactive report and it contains 500000 records. and iam using pagination x to y but background it loads complete rows from database.
To load complete 500000 records page taking 10 minutes.So My reqiurement is I need to load first set of rows like 500 rows and Once i click next button then only it should load next set of rows like 501 to 1000.
Please tell any idea to resolve the above problem.
thanks
balu
Balu,
try to trace your page to see how your statement can be tuned. To do that add &p_trace=YES to the URL.
This creates a standard Database Trace file which can be analyzed with TKPROF or SQL Developer or similiar tools.
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
BuilderPlugin: http://builderplugin.oracleapex.info
Work: http://www.click-click.at
Similar Messages
-
How to set number of rows in "Rows Per Page Selector" in Interactive Report
Hi Guys,
Is there any way to set the number of rows in "Rows Per Page Selector" in Interactive Report. By default it is set to 15.
I know one way is to change the number of rows when you are running the report and then set that as 'Default Report Setting'.
If anybody is aware of any other way, please let me know.
Cheers,
Ashish Agarwal
http://www.dbcon.com.sgHi Pavel,
can you please specify your question more clearly. If you are on NW 7.0 you can determine a number of colums for your filter item with following command:
COLUMNS
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/85/08e241aa8e9d39e10000000a155106/content.htm
If you meant the amount of rows within the analysis item you can use following command within your analysis item:
BLOCK_ROWS_SIZE (numbers of rows displayed at once)
BLOCK_ROWS_STEP_SIZE (numbers of rows to be scrolled for one step)
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/76/489d39d342de00e10000000a11402f/content.htm
Brgds,
Marcel
Edited by: Marcel Landsfried on Feb 10, 2009 7:45 PM
Edited due to wrong url -
Question about setting Rows to "All" for defualt Interactive Report
I have a default report with 2 user requirements that I have some questions about.
1. The report in the data sould be 90 days old.
2. The report show "All" rows.
First to set the date I have this page process:
apex_util.ir_clear(p_page_id => 2);
apex_util.ir_filter(p_page_id=>2,
p_report_column=>'REQUISITION_DATE',
p_operator_abbr=>'GTE',
p_filter_value=>SYSDATE - 90);
I also set the rows to "All" and save the report to be the default. However I think when the "apex_util.ir_clear(p_page_id => 2)" is executed it clears someting and my report opens with rows set to "15".
Any ideas on this or even a better way to do it?the following link may help...
It says that the ir_clear "Clears any report filters including default filters"
apex_util.ir_* documentation - where to find them?
Gus.. -
Is that possible to add set pagination to interactive reports?
Hi, Guys:
Is that possible to add set pagination to interactive reports like that in classic reports (like row 1 to 20, row 21to 40,...)? I know Jarola had implemented it on
http://actionet.homelinux.net/htmldb/f?p=100:1
see thread Column Alignment / Pagination in Interactive Reports
I can add arrow to last page of report, but I still cannot figure out how to add set pagination to interactive report like what Jarola did, could anyone help me on this?
Thanks.
Sam
Edited by: lxiscas on Nov 6, 2012 3:22 PMI made it!
http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:41900346848694
Edited by: lxiscas on Nov 6, 2012 4:44 PM -
How do I extract a set of rows from a table based on specified criteria?
I am using Numbers '08. I have a table that looks like this:
I would like to, programmatically, find the MAX amount of all the 'Clothing' category items. More generally I'd like it to work like the COUNTIF function where I can do this:
MAX(INCLUDEIF('Table::Category', 'Clothing'))
I think my intention is clear.
I suppose an alternate way is to create a table for every category and just do a MAX over that table, but this seems redundant since I already have that data in this particular table. Thanks!The easiest way, to me, is to add a new column to you data table which only shows values from rows that match the category for which you want to find the max():
The new column (in this example) is titled "Active Category" and is selected from a Summary table. Add a new table titled "Summary" as shown.
Make cell B2 contain the category.
Let's get the data table set up with the new column:
E2=IF(C2=Summary :: $B$2, D2, "")
select E2 and fill down. This will only show the amount IF the category in column C matches what you entered in the summary table:
Now let's complete the summary table:
B3=MAX(Data :: E)
I hope this helps -
How to show only filtered rows in download file of Interactive report
I have an interactive report.
If i filter column A and don't want to show column A in the download spreadsheet or PDF(NVL(:REQUEST,'column A') NOT IN('XLS','PDF'). All of the rows will show up in my download file. How could i show just filtered rows in the download file and also don't show the filter column?
Thanks,
Jen
Edited by: Jen Hu on Nov 22, 2010 2:54 PMHI,
For example your model node is CountryModelNode and the value node binded to table is CountryValueNode then:
int sizeCountryModelNode=wdContext.nodeCountryModelNode().size();
for(int iCount=0;iCount<sizeCountryModelNode;iCount++)
if("IN".equalsIgnorecase(wdContext.nodeCountryModelNode().getCountryModelNodeElementAt(iCount).getCountryCode())
|| "US".equalsIgnorecase(wdContext.nodeCountryModelNode().getCountryModelNodeElementAt(iCount).getCountryCode()))
IPrivateCountryValueNode.ICountryValueNodeElement element=wdContext.createCountryValueNodeElement();
element.setCountryCode(wdContext.nodeCountryModelNode().getCountryModelNodeElementAt(iCount).getCountryCode());
element.setCountryName(wdContext.nodeCountryModelNode().getCountryModelNodeElementAt(iCount).getCountryName());
wdContext.nodeCountryValueNode().addElement(element);
Note: Bind CountryValueNode to the table:
Regards,
Charan -
How to get .oce to talk to DAS & bring back data in Interactive Reporting?
Hi Hyperion Experts,
This is also a fairly basic question, I use Hyperion 9.3.1 and I have Shared Services, Workspace and Interactive Reporting Studio running on our Windows 2003 Server.
My goal is to import a .bqy document I created in Interactive Reporting Studio into workspace, and be able to click on the "refresh" button and see it refreshes the data from the backend Oracle 10g database.
I have completed the following steps so far,
1. I have created a DSN. This DSN, named "Oracle 10g Data Source", when I clicked on "Test Connection" button, It ran successfully.
2. I have created a new Datasource entry in the DAS service. If I double click on the newly created Datasource entry, the screen would display the following details.
Connectivity Type = Oracle Net
Database Type = Oracle
Enter the name of the Data source = Oracle 10g Data Source
Select the name of the Data source (it is grayed out, nothing selected)
Server/File (it is grayed out, nothing entered)
then, followed by some default connection parameters.
3. I have created a "Oracle 10g Data Source.oce" file using the Interactive Reporting Studio. I saved the .oce file at
C:\Hyperion\BIPlus\data\Open Catalog Extensions\Oracle 10g Data Source.oce
4. I created a new constrProj_Oracle10gOCE.bqy, during the creation, I chose
"Create a new document with Recent Database Connection File" option, then I chose the Oracle 10g Data Source.oce that I have created in step 3. After I log in with host user/password, I have created a data model and I see that it brings back a data set when I clicked on the "process" button. I saved this .bqy document.
5.
I imported the Oracle 10g Data Source.oce and constrProj_Oracle10gOCE.bqy into the workspace under a folder called
Root/MYBI/Test
6. I right click on the constrProj_Oracle10gOCE.bqy document, and chose "Open". It opened with Results section highlighted on the left hand side, and with data showing on the right hand side. However, when I clicked on the "refresh" button, I'd get a message box with a red X. It says,
An Interactive Reporting Service error has occurred -
Failed to acquire requested service.
(2001)
I guess the data I see in this constrProj_Oracle10gOCE.bqy was just the cached data that was brought back when I hit the process button of this .bqy when it was first created in the Studio, and that it never established any connection via the DAS service to the backend.
Could someone please show me what I have done wrong here?
thanks,
hypuser1010EricaHarris,
Yes, the issue is still open. Obviously, I have gone down the path of "Scenario One".
Based on your reply, I have done the following.
There are three things I am configuring here: DSN, DAS and OCE.
1) When I created the DSN,
I started the ODBC Data Source Administrator, Click on second tab "System DSN". I added a new ODBC Data Source.
Data Source Name = Oracle 10g Data Source
TNS Service Name = //146-abc.xyz.com:1521/MYORCL0617
2) I re-created the DAS entry, per your suggestion, I made sure that "the name of the data source will be the host name you specified in your OCE".
Connectivity Type = Oracle Net
Database Type = Oracle
Enter the name of the data source= //146-abc.xyz.com:1521/MYORCL0617
3) for my OCE, I specified
Connection Software = Oracle Net
type of Database = Oracle
on the first screen.
then, on the next screen, I specified
Host = //146-abc.xyz.com:1521/MYORCL0617
I reployed the OCE, the .bqy document and restarted DAS. Yes, my .bqy document does refresh its data successfully from the backend.
However, I am not 100% convinced that the .bqy uses the OCE which talks to the DAS, which talks to the DSN entry and brings data back to the .bqy document.
Here is what I did,
I opened up the DSN entry, changed the TNS Service Name from //146-abc.xyz.com:1521/MYORCL0617 to
//146-abc.xyz.com:1521/NONSENSE. I then restarted DAS and redeployed the .bqy document. the .bqy document is still able to refresh its data. So, I have just proven that the .bqy document does not need a valid DSN entry to work, how come??
Can you (or anyone) please explain the phenomenon that I see?
Also, a very basic question. you know that when you create a .bqy in the Studio, you "import" an OCE into the .bqy document so that the .bqy knows that it should use this OCE to talk to the backend data source. but, when you deploy this .bqy in workspace, how does the .bqy know that it is supposed to go through DAS (and DSN) to interact with the database, rather than the "internal" OCE that was pre-built with this .bqy?
thanks,
hypuser1010 -
Get row number of record in Interactive Report
I am using an interactive report and want to be able to modify a field and if the value already exists in the database change it back to what it was originally. I am selecting data using the select statement below and I'm calling the javascript CheckExists function when the value changes. All this is working but I need to figure out how to get the row number so I can change the value back to what is in f03 in the same row. Does anyone know how to access the row number or know how I can do this?
select apex_item.checkbox(1, RESOURCE_TYPE_ID, 'onchange="CheckUsed(this, this.value);"', ':') "Delete",
apex_item.text(2, RESOURCE_TYPE, 20, 100, 'onchange="CheckExists(this, this.value);"' ) "RESOURCE_TYPE",
RESOURCE_TYPE_ID,
apex_item.text(3, RESOURCE_TYPE, 20, 100) "orig_resource_type"
from resource_types
order by RESOURCE_TYPEScott,
I was not able to find anything like using #ROWNUM# that would give me the current row number but I was able to get it if I looped through all the records until I found the record I was currently on. It is not really what I wanted to do but it works. I have included the code below.
Thanks a lot for your help I appreciate it.
Steve
*** Interactive Report Select statement ***
select apex_item.checkbox(1, RESOURCE_TYPE_ID, 'onchange="CheckUsed(this);"', ':') "Delete",
apex_item.text(2, RESOURCE_TYPE, 20, 100, 'onchange="CheckExists(this);"' ) RESOURCE_TYPE,
RESOURCE_TYPE_ID,
apex_item.text(3, RESOURCE_TYPE, 20, 100) ORIG_RESOURCE_TYPE
from resource_types
order by RESOURCE_TYPE
*** Javascript ***
function CheckUsed (pResourceType)
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ResourcesResourceTypeExists',0);
get.add('TEMPORARY_ITEM', pResourceType.value);
gReturn = get.get();
if (gReturn > 0)
alert('Resource records exist using the Resource Type; Unable to delete.');
pResourceType.checked=false;
function CheckExists (pResourceType)
// Get the current row number.
var lResourceTypeId = document.getElementsByName("f01");
var lResourceType = document.getElementsByName("f02");
var lOrigResourceType = document.getElementsByName("f03");
var j;
for (j = 0; j < lResourceType.length; j++)
if (lResourceType[j].value == pResourceType.value)
if (lResourceType[j].value != lOrigResourceType[j].value)
break;
} // if (lResourceType[j].value != lOrigResourceType[j].value)
} // if (lResourceType[j].value == pResourceType.value)
} // for (j = 0; j < lResourceType.length; j++)
// Check if the Resource Type already exists.
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ResourceTypeExists',0);
get.add('TEMPORARY_ITEM', pResourceType.value);
gReturn = get.get();
if (gReturn > 0)
// Reset the Resource Type to the original Resource Type.
get.add('lResourceType[j]', lOrigResourceType[j].value);
doSubmit('SUBMIT');
else
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=UpdateResourceType',0);
get.add('TEMPORARY_ITEM', pResourceType.value);
get.add('TEMPORARY_ITEM_2', lResourceTypeId[j].value);
gReturn = get.get();
alert(gReturn );
} -
Pagination on interactive report - how to move it on my layout
okay, I am working with the basic interactive report, no tweaks. My end user doesn't seem to worry about much horizontal scrolling, although it goes against my personal web dev standards to do that without significant necessity. But with the templates as they are, the pagination for the next/prev set of records is WAAAY over to the right. I find this bothersome, and for the benefit of my user, I would like to left-align this. I've looked on Google, done a search in this forum, and checked the APEX docs, not much leaping out at me. I suspect I can tweak a div class on some template, not having an easy time finding that.
helpful thoughts on this? TYIA, and points for a working idea.Hi,
Have you try change "Pagination Display Position" from Interactive Report Attributes?
Regards,
Jari
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
How to get the first or last row value from a group using ntile
I want to query and use ntile to divide by data in 4 groups (quartiles). I got this part no problem and it returns the list of rows and the ntile bucket value for each one.
What I want though is to get only the first row from each ntile group (so in effect the max, q3, median, q1 and min values from the whole result). Of course I coud get max, min and median directly using the other functions, but how about the values for q3 and q1?
My query contains this:
NTILE(4) OVER (ORDER BY salary DESC NULLS LAST) as ntile
So I want the highest, lowest, middle, q3 and q1 values for the salaries.
Should I be using NTILE, ROWNUM, PERCENTIL_DIST....?
Any ideas? Thanks in advance.SQL> select ename,sal,
2 NTILE(4) OVER (ORDER BY sal DESC NULLS LAST) as ntile
3 from emp
4 /
ENAME SAL NTILE
KING 5000 1
FORD 3000 1
SCOTT 3000 1
JONES 2975 1
BLAKE 2850 2
CLARK 2450 2
ALLEN 1600 2
TURNER 1500 2
MILLER 1300 3
WARD 1250 3
MARTIN 1250 3
ENAME SAL NTILE
ADAMS 1100 4
JAMES 950 4
SMITH 800 4
14 rows selected.
SQL> select ename,
2 sal
3 from (
4 select ename,
5 sal,
6 ROW_NUMBER() OVER (PARTITION BY ntile ORDER BY sal DESC NULLS LAST) as rn
7 from (
8 select ename,
9 sal,
10 NTILE(4) OVER (ORDER BY sal DESC NULLS LAST) as ntile
11 from emp
12 )
13 )
14 where rn = 1
15 /
ENAME SAL
KING 5000
BLAKE 2850
MILLER 1300
ADAMS 1100
SQL> SY. -
How to get iterator to set the row key programmatically after a refresh
I have a master detail page as master form with navigation and a detail table. When i create a new master record in a specific form i want to return to the master detail after the cache is refreshed and set the currency (selected row) to the last row.
I override the persistEntity action method and get the bindings and bindingOperation but i didn't find a way to get the iterator to set it to the last row (the new inserted row).
Any idea is welcome ?
Thanks for helpfound it in SRDemo ... for the ones that will have same difficulty to find it !
public String cancelButton_action() {
//Reset the product list to the first item
DCIteratorBinding productIter =
((DCBindingContainer)getBindings()).findIteratorBinding("findAllProductIter");
productIter.setCurrentRowIndexInRange(0);
//Navigate back to the list page
return "GlobalHome";
} -
How to load a specific set of classes at runtime.
Howdy!
I want to load all the classes in a directory that implement a specific Interface, at runtime. Of course i can load all the classes if i know the String name.
Class t = Class.forName(ruleClass);
cnst = t.getConstructor( new Class[] { Session.class } );
try {
Object obj = cnst.newInstance(new Object[] {
m_fwkSession });
IRules rule = (IRules)obj;
...................where IRule is an interface.
How do i get all the files in that directory and find the classes implementing that interfaces ?You can either load all the classes and then test if they are assignable from IRule.class (isAssignableFrom())
(you could use a custom classloader if you wanted these classes to be garbage collected)
or
Open the class files and scan them to see if they contain
"myPackage/IRule"
(maybe you would have to parse the .class file, but just scanning it might be good enough) -
How to load data from file contains rows with different number of columns
hi all,
a data file contains assets data ordered like this(location_id
serial_number , quantity
serial_number , quantity
single column rows represents location, and two columns rows represents asset details for that location
123
12345 ,1
32145 ,1
124
12348 ,12
41239 ,22
54189 ,2
254
22419 ,1
I want to use sql loader to load these data after merging locations with thieir assets,like this order(location_id,serial number,quantity)
123 ,12345 ,1
123 ,25413 ,1
123 ,32145 ,1
124 ,12348 ,12
124 ,41239 ,22
124 ,54189 ,2
254 ,22419 ,1
Can one help me in that?
thank you,Create external table and code sql query to do it.
:p -
How to add a comment for each row on the output of a report?
I would like to add a comment (field) for each row on the output of report? This comment should to be saved as well. Is there a way i can do that?
Regards,
RamHi Dimitri,
through the instead of trigger functionality i am able to update the view. This is view is based on different views which should be linked to a table (as you suggested) in which comments can be stored. Hower this table is empty and how to link this table with the view now? I face the following challenge.
View consists the following columns, for example
select name, sex, age from test_view
name sex age
John M 20
Anton M 30
Willy M 40
shirley F 38
sharon F 37
The report has the following output, for example
name sex age
John M 20
Anton M 30
Willy M 40
Shirley F 38
Sharon F 37
Now i would like to add comment through a button.
The report layout looks like
name sex age
John M 20 <add comment button>
After submitting the <add comment button> you can enter text which deals with John
text='John doesnot like me'
Finally the report display the comment as well
name sex age
John M 20 'John doesnot like me' <update/delete comment button>
Anton M 30 <add comment button>
Willy M 40 <add comment button>
Shirley F 38 <add comment button>
Sharon F 37 <add comment button>
After submitting the <update/delete button> you can change or delete the entered text.
I hope this example clears things up.
Regards,
Ram -
I know the FIRST_ROWS hint tells the optimizer to minimize time to first row. I know the new 12c functionality for "FETCH [FIRST|NEXT] [N] ROWS [ONLY|WITH TIES]"fetch first/next N rows only/with ties" will implement the query using ROW_NUMBER(). Should I leave hint in case it improves performance, or does the FETCH FIRST clause make this hint redundant?
maybe the answer to this question is more complicated then I assumed at first: as Randolf Geist wrote in his presentation Everything You Wanted To Know About FIRST_ROWS_n But Were Afraid To Ask a rownum predicate implicitly defines a first rows n optimization. So I guessed that the fetch first clause would trigger a similar optimization. But a rownum predicate and a fetch first clause are not transformed into the same operation:
create table t
as
select rownum id
from dual
connect by level <= 1000000;
select id
from t
where rownum <= 5;
ID
1
2
3
4
5
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5 | 25 | 2 (0)| 00:00:01 |
|* 1 | COUNT STOPKEY | | | | | |
| 2 | TABLE ACCESS FULL| T | 5 | 25 | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter(ROWNUM<=5)
select id
from t
fetch first 5 rows only;
ID
1
2
3
4
5
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1000K| 24M| 427 (1)| 00:00:01 |
|* 1 | VIEW | | 1000K| 24M| 427 (1)| 00:00:01 |
|* 2 | WINDOW NOSORT STOPKEY| | 1000K| 4882K| 427 (1)| 00:00:01 |
| 3 | TABLE ACCESS FULL | T | 1000K| 4882K| 427 (1)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("from$_subquery$_002"."rowlimit_$$_rownumber"<=5)
2 - filter(ROW_NUMBER() OVER ( ORDER BY NULL )<=5)
Looking at a CBO trace for the two operations I see signs of a first rows optimization only for the query with the rownum predicate:
Final query after transformations:******* UNPARSED QUERY IS *******
SELECT "T"."ID" "ID" FROM "C##TEST"."T" "T" WHERE ROWNUM<=5
First K Rows: Setup begin
And so I think there is no first rows optimization for the fetch first clause. Of course the analytics would make an optimization for fast response almost impossible if there is an order in the query since in this case the analytics have to read the complete set before the filtering takes place.
Regards
Martin Preiss
Maybe you are looking for
-
Firefox Hangs Downloading and Displaying PDF Files
I've had a problem with Firefox for several years where it hangs in the middle of the file when downloading and displaying a PDF file. Typically it downloads a few hundred kilobytes and then stalls. Recently I upgraded from Acrobat 8.1 to Acrobat 9.
-
Reloading OS 9 on OS 10.4
Problem: I cannot reload OS 9 back onto OS 10.4. from either of 3 discs with various version of OS 9 on them. My iMac G5 had been operating properly for several years but I recently had to do a clean install and after that the iMac acted as if the OS
-
GUYS,GALS,FELLOW GEEKS, NERDS, PROFESSIONALS, AND the like. I have a major issue of why after installing ADK it says when after running that the operating system isnt supported? I see no rational of why it would do that. ANYONE who is privvy to such,
-
Device selection for HA cluster root ip
Hi all, Several times I had (and still have) problems, that the cluster root ip in a ha-enviroment is bounded to the loopback interface (lo) as lo:0 instead to xenbr0 (as xenbr0:0) Does anyone know where and how this interface selection takes place?
-
Dear All, How can we configura a proxy for ABAP connections to internet? There is a proxy section in SICF transaction. But connection does not succeed. Also we tried entering proxy information directly in ABAP code but connections still fails. How ca