Browsing "Older Posts"

APEX-AT-WORK no image

IRR: UILayout issue

Von Tobias Arnhold → 8.17.2011
If you use the UILayout plug-in for APEX with Interactive Reports you will see some issues inside the action menu. The "Rows Per Page" and the "Format" menu will be positioned above the main action menu.

To fix this use the following js snippet with a dynamic action or add it inside your page header:
$('.dhtmlSubMenuS').mouseover(function() {

  $('#apexir_ROWS_PER_PAGE_MENU').css({

    left: $('#apexir_ROWS_PER_PAGE_MENU').position().left + 200 + "px"

  });

  $('#apexir_FORMAT_MENU').css({

    left: $('#apexir_FORMAT_MENU').position().left + 200 + "px"

  });    

});


Create a Dynamic Action which fires on the refresh of your Interactive Report and executes the JS code. Run it also on page load.

I will fix it in one of the next versions of the plug-in.

IRR: Remove single rule

Von Tobias Arnhold → 8.09.2011
If you want to remove easily a single rule inside your interactive report then use this javascript code snippet:

$('a:contains(Vorname ist Null)').parent().parent().remove();

Customized IRR example:
/* Remove Highlight rules */

$('a:contains(MY_RULE1_BLUE)').parent().parent().remove();

$('a:contains(MY_RULE2_GREEN)').parent().parent().remove();

$('a:contains(MY_RULE3_ORANGE)').parent().parent().remove();

/* remove filter */

$('a:contains(My Column filter = \'FILTER\' )').parent().parent().remove();

/* Remove named report */

$('a:contains(Gespeicherter Bericht = \"My filtered report\")').parent().parent().remove();

/* Remove group label text */

$('#apexir_SAVED_REPORTS optgroup[label="Standard"]').attr("label","");

$('#apexir_SAVED_REPORTS optgroup[label="Öffentlich"]').attr("label","");

/* Remove Control Panel Control and make it always active */

$('#apexir_CONTROLS_IMAGE').removeClass('pseudoButtonActive');

$('#apexir_CONTROLS_IMAGE').addClass('pseudoButtonInactive');

/* gReport.toggle_controls($x('apexir_CONTROL_PANEL_CONTROL')); */

$('#apexir_CONTROL_PANEL_CONTROL').hide();
APEX-AT-WORK no image

Check if part of a string has only number values

Von Tobias Arnhold → 8.06.2011
I had the requirement to find out if a part of a string includes only number values:

Table: My_Test_String_Table
Column: T_STR
String 1: TIGER031STD
String 2: TIGERTT1STD
String 3: TIGER999STD

Now I need to find all rows where position 6, 7 and 8 is a number value.

Select:

select * from My_Test_String_Table
where
decode(REGEXP_INSTR (substr(T_STR,6,3), '[^[:digit:]]'),0,'YES','NO') = 'YES';

Returns String 1 and 3!

Take a look into this forum post to find more examples:
http://forums.oracle.com/forums/thread.jspa?threadID=371057
APEX-AT-WORK no image

IRR: Get current report selection

Von Tobias Arnhold →
With Interactive Reports you are able to save several views of one report source.
- Default
- Public
- Private

Your end user can easily choose from those saved reports.
If you need to know which the currently viewed report is then you can use this little js code snippet:
alert(
'ID: ' + 
$('#apexir_SAVED_REPORTS').val() + 
', Text: ' + 
$('#apexir_SAVED_REPORTS :selected').text()
);


Try it inside a dynamic action!
APEX-AT-WORK no image

New Plug-in: Hyphenation for APEX

Von Tobias Arnhold → 7.02.2011
I just released a new plug-in called: Hyphenation for APEX

Unfortunately at the moment it seems only to work with Firefox. I contacted the developers of the original plug-in to find the issue why it doesn't work with IE9 and the standard APEX theme?

Check out this ticket for more information: http://code.google.com/p/hyphenator/issues/detail?id=146

I will update the plug-in as soon as I have a solution.
APEX-AT-WORK no image

How to find duplicate rows?

Von Tobias Arnhold → 6.08.2011
Basically with a single table you do like this:

SELECT COLUMN_A, COLUMN_B, COUNT(*)
FROM MY_TABLE
GROUP BY COLUMN_A, COLUMN_B
HAVING COUNT(*)>1;

If you have a special select and you need to find duplicate rows then do like this:

select count(*), cust_no
(
select
c.cust_no, c.cust_name, s.order_date, s.art_no, s.art_amount
from table_sales s, table_customer c
where c.cust_no = s.cust_no
and s.country_no = 49
and s.order_date = trunc(sysdate-1)
group by
order by 2,3
)
group by cust_no
having count(*) > 1
APEX-AT-WORK no image

Check ob Flash installiert ist

Von Tobias Arnhold → 6.06.2011
Ich habe vor ein paar Tagen ne interessante Frage gestellt bekommen:
"Wie überprüft man in Apex, ob ein Flash Plugin installiert ist?"
Antwort:
Einen Standard-Check gibt es nicht.

Lösungsansatz:
Probiert folgende Erweiterung JavaScript Flash Detection Library (Flash Detect)

Die Datei "flash_detect_min.js" auf eurem Server laden und in den APEX Page Header einbetten.

Auf eurer Startseite erstellt ihr ein Hidden Item: P1_FLASH

Auf der gleichen Seite erstellt ihre eine Dynamic Action die nach dem "Page Load" startet.

Erste TRUE Action: Execute Javascript Code
if(!FlashDetect.installed){
$s('P1_FLASH','TRUE');
}else{
$s('P1_FLASH','FALSE');
}

Zweite TRUE Action: Execute PL/SQL Code
Code: null;
Page Items to Submit: P1_FLASH

Nun könnt ihr auf jeder Seite für die betroffenen Regionen Bedingungen integrieren:
:P1_FLASH = 'TRUE'

Das Ganze könnte auch ein schönes kleines Plug-in sein! :D