In order to conditionally hide/show a button, I needed to know whether a particular report on a page returned any rows.
This can easily be done with a line of jQuery, which differs between classic and interactive reports:
- Make sure to give your report a static ID. In this example it is emp.
- Classic Report: If data is returned there will be a div with an id that prepends ‘report_’ to the report static id. Check the length of that div to find out if it exists. If it doesn’t, the length will be zero, meaning no rows were returned.
- Interactive Report:
- Here, if the length comes back as one, the report returned no rows.
Thanks to @rimblas for a correction.
This is the presentation I gave at KScope 14 in Seattle this year.
Ever wonder how much easier it would be to make sense of your geographic data if you could visualize it? Learn how to free your geographic data from the confines of your tables, and render it in colorful pins and polygons, to provide you with a better perspective.
Enkitec has been acquired by Accenture. We’re very excited about this move, and the new opportunities it brings.
More details at Enktec.com.
Tags: data, oracle, pl/sql, sql, xml
Today I came across this awesome website which will automatically generate data for you, and spit it out in different formats. These include XML, CSV, Excel, and more. But the coolest format of course is Oracle SQL. The website will generate the table creation script and the insert statements for your data:
CREATE TABLE myTable ( id number primary key, name varchar2(255) default NULL, city varchar2(255), age varchar2(50) default NULL, zip varchar2(10) default NULL, PRIMARY KEY (id) ) AUTO_INCREMENT=1; INSERT INTO myTable (name,city,age,zip) VALUES ('Ian Parks','New Orleans',15,'8587'); INSERT INTO myTable (name,city,age,zip) VALUES ('Silas Blackburn','Dunbar',40,'97129'); INSERT INTO myTable (name,city,age,zip) VALUES ('Kenyon Hammond','Varsenare',60,'6744');
Note: You may have to work with the quotes.
How cool is that?
I’ve previously blogged about another way of generating random data, so take a look at
Here is an excellent post about enabling logging in the Apex Listener/ORDS.
Originally posted on cdivilly:
The easiest way to turn logging on in Listener 2.0.1 is to use Oracle SQL Developer to turn on the
- Launch SQL Developer
View|APEX Listenerfrom the main menu
- Right click on
- Choose an existing connection or create a new connection
- Enter the credentials for the Listener Administrator user
- In the tree view naviagate to the
Listener>Administration>Global Settings>Environment>Error Reportingnode. Tick the
Show debug messages on the consoleoption.
- Click the
Uploadbutton from the toolbar (5th from left), and click yes to confirm the upload.
- The changes will immediately take effect on the Listener instance
Alternatively if your prefer you can edit the
defaults.xml Listener configuration file directly. Adding the following to the file to enable logging:
You must restart the Listener instance after editing
Displaying logging information on the Error Page
Listener can be…
View original 941 more words
Tags: optimization, oracle, performance, plsql, tuning
Tags: apex, application express, connect by, hierarchy, level, oracle, pl/sql, plsql, row numbering, sql
Here is a trick to change your rownumbering (or any other sequential numbering) to the way Excel names their columns. The first 26 rows will be named A – Z, the next 26 AA – AZ, then BA – BZ, etc..
SELECT decode( ceil( ( ROWNUM / 26 ) - 1) , 0, '' , chr( ceil( (ROWNUM/26)-1 ) + 64) ) || chr(64 + decode( MOD(ROWNUM, 26) , 0, 26 , MOD(ROWNUM, 26) ) ) col2 FROM dual CONNECT BY LEVEL <= 702; --limits the result to 702 rows Result: Row Label --------------- 1 A 2 B 3 C 4 D 5 E … 28 AA 29 AB 30 AC 31 AD 32 AE … 698 ZV 699 ZW 700 ZX 701 ZY 702 ZZ
Note that this will be good for 702 rows (nbr_of_letters * (nbr_of_letters+1)). After that you’d have to concatenate a third character, or write a function.