Friday, June 26, 2020

Add button in Oracle apex Field

Pre Text

<button type ="button">

<a class="active" href="f?p=&APP_ID.:17:&SESSION.::&DEBUG.::::#openModal">New Party</button>

Saturday, June 13, 2020

Click Menu Node then expand and collapse in oracle apex



Global Page 0, create a new dynamic action on page load that is going to run one the following javascript code depending on the target type you have on your list entry

1. Use this one if you set your target type to URL and your URL target to #

$('#t_Body_nav #t_TreeNav li.a-TreeView-node--topLevel > div.a-TreeView-content:has(a[href="#"])').click(function(){ $(this).prev('span.a-TreeView-toggle').click(); });

2. Use this one if you set your target type to - No Target -

$('#t_Body_nav #t_TreeNav li.a-TreeView-node--topLevel > div.a-TreeView-content:not(:has(a))').click(function(){ $(this).prev('span.a-TreeView-toggle').click(); });


EDIT: If you want to use this for a multi-level menu, the javascript dynamic action code will need to be changed. After debug it, I found out that the submenu items are generated dynamically when expanding it’s parent. So the click event from the above code is not registered for the new li tags. We need to

Use this one if you set your target type to URL and your URL target to #

$('#t_Body_nav #t_TreeNav').on('click', 'ul li.a-TreeView-node div.a-TreeView-content:has(a[href="#"])', function(){ $(this).prev('span.a-TreeView-toggle').click(); });


Use this one if you set your target type to - No Target -

$('#t_Body_nav #t_TreeNav').on('click', 'ul li.a-TreeView-node div.a-TreeView-content:not(:has(a))', function(){ $(this).prev('span.a-TreeView-toggle').click(); });

Friday, June 12, 2020

Tabs color in oracle apex


--inline in page

.t-Tabs--pill .t-Tabs-item.is-active .t-Tabs-link, .t-Tabs--pill .t-Tabs-link:active, .t-Tabs--pill .t-Tabs-link:hover{
   
    font-weight: bold !important;
    background-color: #10ea1e3b !important;
}

Thursday, June 11, 2020

oracle 12c report run on url parameters

PROCEDURE PRINT_PROC_url IS

v_rep               VARCHAR2(1000);
rep_url varchar2(2000);
v_Params varchar2(2000);
v_Params1 varchar2(2000);
v_userid       varchar2(1000):='jayson/jsn@orcl';
v_host         varchar2(1000):='localhost:9002';  --:global.IP;
v_path_int     varchar2(1000):='E:\JAYSON\'; --:GLOBAL.MENU_PATH;
v_path         varchar2(1000);
v_desformat    varchar2(1000);
BEGIN

v_desformat:='pdf';  --spreadsheet

v_Params:= '&P_DT1='||:JNPBD_STN_MAST.DT1
||'&P_DT2='||:JNPBD_STN_MAST.DT2
   ||'&P_PRODUCT_CD='||:JNPBD_STN_MAST.PRODUCT_CD
   ||'&P_ITEM_CD='||:JNPBD_STN_MAST.ITEM_CD;

 
 
        if :JNPBD_STN_MAST.REPOT_LIST=1 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_mps.rdf';
        elsif :REPOT_LIST=2 then                             
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_wbs.rdf';
   
        elsif :REPOT_LIST=3 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_material_used_for_product.rdf';
   
        elsif :REPOT_LIST=4 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_mfg_bd_dt.rdf';
 
        elsif :REPOT_LIST=5 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_mfg_bd_dt_code.rdf';
   
        elsif :REPOT_LIST=6 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_mfg_bd_dt_name.rdf';
 
        elsif :REPOT_LIST=7 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_mfg_comp_uncomp.rdf';
   
        elsif :REPOT_LIST=8 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_charge_recons1.rdf';
 
        elsif :REPOT_LIST=9 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_product.rdf';
   
        elsif :REPOT_LIST=10 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_list_of_item.rdf';
 
        elsif :REPOT_LIST=11 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_Product_group_list.rdf';
 
        elsif :REPOT_LIST=12 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_material_type_list.rdf';
   
        elsif :REPOT_LIST=13 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_material_group_list.rdf';
 
        elsif :REPOT_LIST=14 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_sbd_list.rdf';
   
        elsif :REPOT_LIST=15 then
        v_path:=''||v_path_int||'JNPBD\Reports\jnpbd_charge_cal_list.rdf';
 
      end if;


rep_url:='http://'||v_host||'/reports/rwservlet?userid='||v_userid||'&report='||v_path||''
||'&desformat='||v_desformat||'&destype=cache'
||''||v_Params||'&paramform=no';

/*

rep_url:='http://'||v_host||'/reports/rwservlet?userid='||v_userid||'&report='||v_path||''
||'&desformat='||v_desformat||'&destype=cache'||''||v_Params||'&paramform=no';

--ok above
rep_url:='http://'||v_host||'/reports/rwservlet?userid='||v_userid||'&report='||v_path||''
||'&desformat='||v_desformat||'&destype=cache'
||'&v_Params&paramform=no';

rep_url:='http://'||v_host||'/reports/rwservlet?userid='||v_userid||'&report='||v_path||''
||'&desformat='||v_desformat||'&destype=cache'
||'&v_Params&paramform=no';
*/


WEB.SHOW_DOCUMENT(rep_url,'_blank');


EXCEPTION

    WHEN OTHERS THEN
   
    MESSAGE('Error, Contact your administrator');
   
END;

Sunday, June 7, 2020

navigation menu bar color in oracle apex



--------------use in global page static region sourece , blank attribute , after header


<style>

/* IRR Report Decoration */

.a-IRR-table tr:nth-child(odd) td {
    background-color: #f1f8ff;
    color: gray;
    height: 1.5em;
    font-size: 11pt;
    font-family: "Arial Narrow";
    border-top:0px #000 solid;
    border-bottom:0px #000 solid;
    padding:0px 5px 0px 5px;
   // border-color: gray;
}
.a-IRR-table th {
    background-color: #daecfc;
}

.a-IRR-table tr:nth-child(even) td {
    background-color:  #fff;
    color: gray;
    height: .8em;
    font-size: 11pt;
    font-family: 'Arial Narrow';
    border-top:0px #000 solid;
    border-bottom:0px #000 solid;
    padding:0px 5px 0px 5px;
   // border-color: gray;
}
/*
#apexir_TOOLBAR {
    padding: 0 0 10px 0 !important;
    }
   
.apexir_TOOLBAR_OPEN {
    background:url("../images/sIRControllerBG.png") 100% -50px !important;
    float:left;
    height:40px;
    overflow:hidden;
    padding:0 10px 0 0;
    }
   
.apexir_TOOLBAR_OPEN .apexir_TOOLBAR_CLOSE {
    background:url("../images/sIRControllerBG.png") 0 0 no-repeat !important;
    color:#000000;
    height:38px;
    overflow:hidden;
    padding-top: 2px;
    }
*/
/* GV Report Decoration */
/*
.a-GV-table tr:nth-child(odd) td {
    background-color: #f1f8ff;
    color: gray;
    height: 2em;
    font-size: 8pt;
    font-family: verdana;
    border-top:0px #000 solid;
    border-bottom:0px #000 solid;
    padding:0px 5px 0px 5px;
}
.a-GV-table th {
    background-color: #daecfc;
}

.a-GV-table tr:nth-child(even) td {
    background-color:  #fff;
    color: gray;
    height: 2em;
    font-size: 8pt;
    font-family: verdana;
    border-top:0px #000 solid;
    border-bottom:0px #000 solid;
    padding:0px 5px 0px 5px;
} */
/*
#apexgv_TOOLBAR {
    padding: 0 0 10px 0 !important;
    }
   
.apexgv_TOOLBAR_OPEN {
    background:url("../images/sIRControllerBG.png") 100% -50px !important;
    float:left;
    height:40px;
    overflow:hidden;
    padding:0 10px 0 0;
    }
   
.apexgv_TOOLBAR_OPEN .apexir_TOOLBAR_CLOSE {
    background:url("../images/sIRControllerBG.png") 0 0 no-repeat !important;
    color:#000000;
    height:38px;
    overflow:hidden;
    padding-top: 2px;
    }
*/
/* Classic Report Decoration */
   
.t-Report-tableWrap tr:nth-child(odd) td {
    background-color: #f1f8ff;
    height: 2rem;
    font-size: 10pt;
    padding:0px 5px 0px 5px;
}

.t-Report-tableWrap th {
    background-color: #daecfc;
    height: 2rem;
}

.t-Report-tableWrap tr:nth-child(even) td {
    background-color: #fff;
    height: 2rem;
    font-size: 10pt;
    padding:0px 5px 0px 5px;
}


/* Breadcrumb Decoration */

.t-BreadcrumbRegion--useBreadcrumbTitle .t-Breadcrumb-item:last-child {
    display: inline-block !important;
    font-size: 1.4rem;
    line-height: 2.4rem;
    font-weight: 700;
    color: #2B4154;
}

.t-BreadcrumbRegion--useBreadcrumbTitle .t-Breadcrumb-item:last-child .t-Breadcrumb-label {
    overflow: hidden;
    display: block;
    font-size: 16px;
    margin-top: -16px;
}

#t_Body_title {
    top: 48px;
    height: 50px;
}

.t-Breadcrumb-item a {
    color: #2370c2 !important;
}

/* End Breadcrumb Decoration */
element.style {
    height: 0px;
}

</style>


--------------use in theme roller


.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-row,
/*.t-TreeNav .a-TreeView-node--topLevel  .a-TreeView-label,*/
.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-toggle,
.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content,
.t-TreeNav .a-TreeView-node--topLevel  .a-TreeView-content .fa {
height: 30px;
/*line-height: px; */
}

.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .a-TreeView-label {
line-height: 20px;
  height: 20px;
}

.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-toggle {
padding: 0px;
  height: 30px;
  line-height: 30px;
}

.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .fa {
padding: 4px 9px 8px 8px;
}

.t-TreeNav .a-TreeView-node--topLevel > ul > .a-TreeView-node {
padding-left: 32px; padding-top: 0px; padding-bottom: 0px;
}

.t-TreeNav .a-TreeView-node--topLevel ul .a-TreeView-content {
  height: 20px;
line-height: 20px;
}

.t-TreeNav .a-TreeView-note--topLevel .a-TreeView-row.is-current--top
.t-TreeNav .a-TreeView-node--topLevel.is-collapsible> .a-TreeView-row,
.t-TreeNav .a-TreeView-node--topLevel ul{
background-color: #b9cee2; /*#3f3954;*/
border-right: 9px solid #e95b54;
border-left: 3px solid #e95b54;
}

.t-TreeNav--styleA .a-TreeView-node--topLevel {
    border-bottom: 1px solid rgba(255, 255, 255, 1.075);
    background: #d5dfe7; /*#7c7c79;*/
    color: blue;
}

Monday, June 1, 2020

CASE Statement

select 
       case when status != 'Closed'
            then '<a href="'||apex_util.prepare_url('f?p='||:APP_ID||':2:'||:APP_SESSION||':::2:P2_ROWID:'||ROWID) || '"><img src="#IMAGE_PREFIX#menu/pencil2_16x16.gif" alt="edit"></a>' 
            else '&nbsp;'
            end edit_link,
       PROJECT,
       TASK_NAME,
       STATUS,
       ASSIGNED_TO,
       BUDGET,
       COST,
       case when status = 'On-Hold' then 0
            when status = 'Closed'  then cost
            else budget
            end estimated_cost
from EBA_DEMO_IR_PROJECTS

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...