Thursday, March 21, 2019

how to run oracle forms 12c or all in apex

runs in internet explorer

create regin : pl/sql dynamic content

begin

HTP.P('<iframe src="http://localhost:9001/forms/frmservlet?form=E:\SCL12C\test12c.fmx" height="500px" width="100% id="li">

</iframe>');

end;

Monday, March 11, 2019

how to recover internal user & password in oracle apex 18.2

Microsoft Windows [Version 10.0.17134.523]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\Quium>cd..

C:\Users> cd..

C:\>cd C:\Apex\apex_18.2\apex

C:\Apex\apex_18.2\apex>sqlplus

SQL*Plus: Release 12.2.0.1.0 Production on Tue Mar 12 10:25:18 2019

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> @apxchpwd.sql
...set_appun.sql
================================================================================
This script can be used to change the password of an Application Express
instance administrator. If the user does not yet exist, a user record will be
created.
================================================================================
Enter the administrator's username [ADMIN] admin
User "admin" does not yet exist and will be created.
Enter admin's email [admin] quium@gmail.com
Enter admin's password [] Enter your password
Created instance administrator ADMIN.


how to create image gallery with plugins

plugins link
https://apex.world/ords/f?p=100:710:15283332136545::::P710_PLG_ID:IMAGE.GALLERY.DE.NHASKO

create table image
(
ID                                                 VARCHAR2(10),
IMAGE_ID                                           VARCHAR2(50),
FILENAME                                           VARCHAR2(100),
MIME_TYPE                                          VARCHAR2(100),
CONTENT                                            BLOB,
LAST_UPDATE                                        DATE,
CHARACTER_SET                                      VARCHAR2(30)
)
--enter image in table

Application Items
FILE_ID

application process
Ajax Callback: Run this application process when requested by a page process.

paste code

begin
for c1 in (select *
             from image
            where id = :FILE_ID) loop
    --
    sys.htp.init;
    sys.owa_util.mime_header( c1.mime_type, FALSE );
    sys.htp.p('Content-length: ' || sys.dbms_lob.getlength( c1.content));
    sys.htp.p('Content-Disposition: attachment; filename="' || c1.filename || '"' );
    sys.htp.p('Cache-Control: no-cache'); 
    sys.owa_util.http_header_close;
    sys.wpg_docload.download_file( c1.content );

    apex_application.stop_apex_engine;
end loop;
end;


create region & set plugins & paste source
create item P61_ID

select 'f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=GETFILE:::FILE_ID:'||IMAGE_ID SHOW_IMAGE,
  FILENAME FILENAME,
  IMAGE_ID IMAGE_ID,
  APEX_UTIL.PREPARE_URL(
    p_url => 'f?p=' ||:APP_ID || ':4:'||:APP_SESSION||'::NO::P61_ID:'||IMAGE_ID,
    p_checksum_type => 'SESSION') IMAGE_URL
from image

Saturday, March 9, 2019

How to store Bengali Data in oracle database

12c database : AL32UTF8
Database want to 10g/11g

sqlplus / as sysdba
password : pass

SHUTDOWN IMMEDIATE
STARTUP RESTRICT
ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;
ALTER DATABASE CHARACTER SET AL32UTF8;
SHUTDOWN IMMEDIATE
STARTUP

Monday, March 4, 2019

Text behind the icon without having to reach for the hamburger menu at the top in oracle apex

First collapse the sidebar manually

Here's how to achieve that using CSS only.

.js-navCollapsed .t-TreeNav .a-TreeView-node--topLevel>.a-TreeView-content.is-hover .a-TreeView-label {
visibility: visible;
left: 48px;
padding: 0 16px;
width: auto; 
background-color: #0459a1; /* This would be your primary color */
}

.apex-side-nav.js-navCollapsed .t-Body-nav
, .apex-side-nav.js-navCollapsed .t-Body-nav .t-TreeNav {
    z-index: 999; /* Make it appear on top of the page content */
}

it's not perfect on mobile, but it's still a nice trick for desktop.

add slno category wise in apex










select null sl,EMPNO,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO
  from scott.emp



#myreport {
  counter-reset: serial-number;
}

#myreport td:last-child:before {
  counter-increment: serial-number;
  content: counter(serial-number);
}


#myreport {
  counter-reset: serial-number;
}

#myreport td:first-child:before {
  counter-increment: serial-number;
  content: counter(serial-number);
}

Friday, March 1, 2019

Function based tables

create or replace function tf_test return apex_t_varchar2 is
  lt   apex_t_varchar2 := apex_t_varchar2(); -- ORA-06531: Reference to uninitialized collection
begin
 for i in 1..12 loop
   lt.extend; -- ORA-06533: Subscript beyond count
   lt(lt.last) := add_months(trunc(sysdate,'yy'),i-1);
 end loop;
 
  return (lt);
end;
/
 
select column_value as dt
from tf_test();


DT
---------
01/JAN/19
01/FEB/19
01/MAR/19
01/APR/19
01/MAY/19
01/JUN/19
01/JUL/19
01/AUG/19
01/SEP/19
01/OCT/19
01/NOV/19
01/DEC/19
 
12 rows selected

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...