الأحد، 26 يناير 2020

Interactive Grid Action Using Dynamic Action

Interactive Grid Region Static ID 'ig_emp'

Add New raw For Interactive Grid


apex.region( "ig_emp" ).widget().interactiveGrid( "getActions" ).invoke( "selection-add-row" );

View Video

Delete raw from Interactive Grid


apex.region( "ig_emp" ).widget().interactiveGrid( "getActions" ).invoke( "selection-delete" );



Enable Edit Mode in Interactive Grid 

apex.region( "ig_emp" ).widget().interactiveGrid( "getActions" ).set("edit", true);
View Video


Save Interactive Grid 


apex.region( "ig_emp" ).widget().interactiveGrid( "getActions" ).invoke( "save" );




السبت، 11 يناير 2020

preview image from directory in oracle apex

1: Create Directory to save File and add privilege to write on Directory to You User

CREATE OR REPLACE DIRECTORY STOCK_DIR2 AS 'C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\i\STOCK_IMAGE';

 GRANT read, write ON DIRECTORY STOCK_DIR2 TO STOCK;

2: Create column html expression in interactive grid Report

<img src="http://localhost:8080/i\STOCK_IMAGE/aa.png" alt="Smiley face" height="42" width="42">


2: to get image dynamically

<img src="http://localhost:8080/i/STOCK_IMAGE/&PRODUCT_CODE..png" alt="Smiley face" height="42" width="42">



How to Store Blob File Outside Oracle Database In Oracle APEX

1: add privilege to use UTL_FILE  to You User

grant execute on utl_file to STOCK;

2 : Create Directory to save File and add privilege to write on Directory to You User

CREATE OR REPLACE DIRECTORY STOCK_DIR AS 'F:\STOCK_IMAGES';

GRANT read, write ON DIRECTORY STOCK_DIR TO STOCK;

3: Use this Procedure to write BLOB file to your disk

create or replace PROCEDURE blob_to_file (p_blob      IN OUT NOCOPY BLOB,
                                          p_dir       IN  VARCHAR2,
                                          p_filename  IN  VARCHAR2)
AS
  l_file      UTL_FILE.FILE_TYPE;
  l_buffer    RAW(32767);
  l_amount    BINARY_INTEGER := 32767;
  l_pos       INTEGER := 1;
  l_blob_len  INTEGER;
BEGIN
  l_blob_len := DBMS_LOB.getlength(p_blob);
  
  -- Open the destination file.
  l_file := UTL_FILE.fopen(p_dir, p_filename,'wb', 32767);

  -- Read chunks of the BLOB and write them to the file until complete.
  WHILE l_pos <= l_blob_len LOOP
    DBMS_LOB.read(p_blob, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw(l_file, l_buffer, TRUE);
    l_pos := l_pos + l_amount;
  END LOOP;
  
  -- Close the file.
  UTL_FILE.fclose(l_file);
  
EXCEPTION
  WHEN OTHERS THEN
    -- Close the file if something goes wrong.
    IF UTL_FILE.is_open(l_file) THEN
      UTL_FILE.fclose(l_file);
    END IF;
    RAISE;

END blob_to_file;

4- use this process to upload file 

DECLARE
  l_blob  BLOB;
BEGIN
  -- Ge SELECT filename,
select
                      BLOB_CONTENT INTO   l_blob
                   FROM apex_application_temp_files
               where NAME= :P5_PRODUCT_IMAGE ;
  
  

  blob_to_file(p_blob     => l_blob,
               p_dir      => 'STOCK_DIR',
               p_filename => :P5_PRODUCT_IMAGE);
END;




الأحد، 3 نوفمبر 2019

الأربعاء، 2 أكتوبر 2019

full track to be oracle apex developer





الحمد لله تم النشر على موقع يودمى
الكورس ان شاء الله
هيكون مستمر وهاضيف عيه باستمرار
انا نشرته حاليا بعد الاتهاء من الجزء الاول
لعدة اسباب
1- ناس كتير طلبت منى سرعه نشره طبقا للاستبيان
2 - علشان انا عاوز يبقى كورس مستمر زى مشروعى الخاص
وهافضل اضيف عليه بصورة مستمرة
فمش هاعرف اقول هاخلص اضافه عليه امتى
3- مش عاوز اعمل اكثر من كورس واكلف الناس
----
ان شاء الله هيكون فيه اضافات زى جزئيات متقدمه
ومشاريع وتحديث باستمار مع اى اصدار جديد نقول ايه اللى اتضاف وايه اللى هيتلغى
-
اللى محتاج خصم للكورس او بصورة مجانيه لعدم القدرة رجاء التواصل على الخاص
---------


يرجى استخدام الكوبون ARABIC_APEX2 للحصول على خصم 20 دولار
-----
يمكنكم مشاهده المحتوى ومشاهدة محاضرات مجانيه
قبل الشراء
-----
يارب الكورس يكون على قد ثقتكم
وبالتوفيق للجميع


السبت، 10 أغسطس 2019

Create Custom PDF Report in Oracle Apex using BIRT

Create Custom PDF Report in Oracle Apex using BIRT

1. Download Birt Designer from Here Or any version you like


2. Download Birt Run-time from here Or any version you like

3. start design you report Emp_1 in Birt Designer

3.1. Create Data source
oracle.jdbc.OracleDriver (v10.2)
jdbc:oracle:thin:@localhost:1521:xe








3.2. Create your Data set
will contain you sql Query 




select * from  EMP

3.3. start Design You Report
3.4 Save You Report

4. Copy Birt Rn-time folder to tomcat setup source
C:\Program Files\Apache Software Foundation\Tomcat 9.0\webappsyo

5- Copy you report Emp_1 that you Created before to
C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\birt

6- don't forgit to copy your ojdbc file to
C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib

7- in Oracle Apex App
create Button and make BehaviorRedirect to URL
and use this 
http://localhost:8080/Birt/run?__report=Emp_1.rptdesign&__format=pdf

where Emp_1 is your report Name


8- run your Page in Oracle Apex and Press You Button you will get


9- Finally Our Arabic Video

  


Thanks 

الخميس، 8 أغسطس 2019

Chart Using PL/SQL Dynamic Content

How to Create Chart Using PL/SQL Dynamic Content


1: first Create Region with PL/SQL Dynamic Content Type

2: Add this Code

declare
    l_cnt              integer := 0;
    max_bars           integer := 16;
    l_total_bars       integer := 0;
    l_start            integer := 1;
    l_display_cnt      integer := 0;
    l_max_bar_sz       number  := 0;
    l_numeric_title    varchar2(255) := 'Customer Categories';
begin

-- determine how many bars exist
    for c1 in (
    select count(*) c
    from (
       select to_char(CREATED,'YYYY.MM') m
       from EBA_CUST_CATEGORIES t
       where IS_ACTIVE = 'Y'
       group by to_char(CREATED,'YYYY.MM')
       )
)
  loop
        l_total_bars := c1.c;
    end loop;

    -- calculate how many to show
    l_start := l_total_bars - max_bars;
    l_start := greatest(l_start,1);

    if l_total_bars > 0 then
        sys.htp.prn('<ul class="barGraph">');
        sys.htp.prn('<li class="barHeaders">');
        sys.htp.prn('<label><span></span></label>');
        sys.htp.prn('<big></big>');
        sys.htp.prn('<span class="noBorder"><strong>'||sys.htf.escape_sc(l_numeric_title)||'</strong></span>');
        sys.htp.prn('</li>');

        -- figure out maximum size of a bar within the window of displayed bars
        l_cnt := 0;
        l_max_bar_sz := 0;
        for c1 in 
          ( select to_char(CREATED,'YYYY.MON') m ,count(*) s
  from EBA_CUST_CATEGORIES t
       where IS_ACTIVE = 'Y'
            group by to_char(CREATED,'YYYY.MON')
           )
        loop
            l_cnt := l_cnt+1;

            if l_cnt >= l_start then
               if c1.s > l_max_bar_sz 
               then
                  l_max_bar_sz := c1.s;
               end if;
            end if;
        end loop;

        -- display chart
        l_cnt := 0;
        for c1 in 
          ( select to_char(CREATED,'YYYY.MON') m , count(*) c
            from EBA_CUST_CATEGORIES t
            where IS_ACTIVE = 'Y'
            group by to_char(CREATED,'YYYY.MON')
            order by 1
          )
        loop
        l_cnt := l_cnt+1;

        if l_cnt >= l_start then
            l_display_cnt := l_display_cnt + 1;
            sys.htp.prn('<li>');
            sys.htp.prn('<label><span>'||substr(c1.m,1,4)||'</span> '||substr(c1.m,6)||'</label>');
            sys.htp.prn('<big><small style="height: '||to_char(round((c1.c/l_max_bar_sz)*100))||'%"></small></big>');
            sys.htp.prn('<span class="noBorder">'||trim(to_char(c1.c,'999G999G999G999G999G990'))||'</span>');
            sys.htp.prn('</li>');
        end if;

        if l_display_cnt > max_bars then
            exit;
        end if;

        end loop;
        sys.htp.prn('</ul>');
    end if;


htp.p(' 
<style>
ul.barGraph
      {
      margin:12px !important;
      list-style:none;
      white-space:nowrap
      }
ul.barGraph li
      {
      display:inline-block;
      width:48px
      }
ul.barGraph li:hover big small
      {
      background-color:#4A6D98
      }
ul.barGraph li.barHeaders
      {
      width:128px
      }
ul.barGraph li.barHeaders > span
      {
      text-align:left
      }
ul.barGraph li > label{
      display:block;
      font:normal 11px/12px Arial,sans-serif;
      color:#444;
      text-align:center
      }
ul.barGraph li > label span
      {
      display:block;
      font:normal 11px/12px Arial,sans-serif;
      color:#767676
      }
ul.barGraph li > big
      {
      height:120px;
      margin:8px;
      position:relative;
      display:block
      }
ul.barGraph li > big > small
      {
      display:block;
      position:absolute;
      bottom:0;
      width:30px;
      -moz-border-radius:4px;
      -webkit-border-radius:4px;
      border-radius:4px;
      background-color:#6A9CDA;
      -moz-box-shadow:0 1px 0 rgba(255,255,255,0.5) inset;
      -webkit-box-shadow:0 1px 0 rgba(255,255,255,0.5) inset;
      box-shadow:0 1px 0 rgba(255,255,255,0.5) inset;
      border:1px solid #4A6D98
      }
ul.barGraph li > span
      {
      display:block;
      text-align:center;
      font:normal 11px/16px Arial,sans-serif;
      color:#444;
      border-top:1px solid #F0F0F0;
      padding:8px
      }
ul.barGraph li > span.noBorder
      {
      border-top:none;
      padding-top:0
      }
ul.barGraph li > span a
      {
      color:##405580
      }
</style>
');
end;

---

Demo
Sample App
user:demo
Pass:demo1234

الثلاثاء، 6 أغسطس 2019

How to Support me in patreon

                                                  ليه تدعمنا
م / على صالح خلف الله
senior Oracle Apex Developer
Support in patreon
دعمك للمحتوى هيساعدنى اكمل فى الفيديوهات بمعدل أكثر
مما يثري المحتوى العربي للتقنيه
ونساعد كل الناس الجديده فى المجال انها تلاقى البدايه
-----
شكرا

hide column in classic report [Card Template] Using Custom Template and CSS




you can hide column in classic report in stranded template
by 2 ways
by condition
like
Rows returned
select 1 from dual where 1=2or by using
Authorization Scheme to column
but if You try to make the same for some other template like CARD Template
this will not work
so that you can flow this steps
1 : Copy card template
2: edit the new card template and one substituting  #CARD_STATUS#
<li class="t-Cards-item #CARD_MODIFIERS#">
#CARD_INITIALS#

#CARD_TITLE#

#CARD_TEXT#
#CARD_STATUS# ">#CARD_SUBTEXT#
</div>
<span class="t-Card-colorFill u-color #CARD_COLOR#"></span>
</a>
</div>
</li>
--
3: Assign the new template to your report and add case to check any condition
select
'fa-user' CARD_ICON,
ENAME CARD_TITLE,
JOB CARD_TEXT,
MGR LABEL_01,
HIREDATE CARD_SUBTEXT,
SAL COMMENT_TEXT,
CASE
when UPPER(JOB) Like Upper('SALESMAN')
then 'Status_CLASS'
else ''
end CARD_STATUS
from EMP
--
in our case when JOB = SALESMAN
we will set value for our column CARD_STATUS by  'Status_CLASS'
-----
now our template contain class Status_CLASS
only when JOB = SALESMAN
-----
4: add inline css code for our class
.Status_CLASS
{display: none;}
at the end
any raw contain [job =SALESMAN] will add  a new class for our column CARD_SUBTEXT  which will hide content

How to create Multi language Application in Oracle apex 19.1

Part 1



Part 2

How to Solve Ords Issue : The request could not be mapped to any database.

 The request could not be mapped to any database.  Check the request URL is correct, and that URL to database mappings have been correctly c...