Sign Up

Hey, Dev!
Are you looking for a forum full of active developers to help you?
So if you want to:
➡️ Get answers for your development issues
➡️ Help others
➡️ Write an article
➡️ Get rewarded for your active participation
Then this place is just for you and it is 100% FREE.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo

OrclQA.Com Navigation

  • Ask Question
  • Write a Tutorial
  • Online Courses
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • Image to Base64
  • PL/SQL Beautifier
  • Ask Question
  • Write a Tutorial
  • Online Courses
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Comments
  1. Asked: March 24, 2022

    Apex Collection: how to have actual column names instead of C001, C002...

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on March 25, 2022 at 12:00 pm
    This answer was edited.

    Select your classic report and then go to Attributes > Heading. Then choose the heading type as PL/SQL Function body and put the following code in it: DECLARE c NUMBER; d NUMBER; col_cnt INTEGER; f BOOLEAN; rec_tab DBMS_SQL.DESC_TAB; col_num NUMBER; v_columns varchar2(1000); PROCEDURE print_rec(rRead more

    Select your classic report and then go to Attributes > Heading. Then choose the heading type as PL/SQL Function body and put the following code in it:

    DECLARE
    c NUMBER;
    d NUMBER;
    col_cnt INTEGER;
    f BOOLEAN;
    rec_tab DBMS_SQL.DESC_TAB;
    col_num NUMBER;
    v_columns varchar2(1000);
    PROCEDURE print_rec(rec in DBMS_SQL.DESC_REC) IS
    BEGIN
    DBMS_OUTPUT.NEW_LINE;
    DBMS_OUTPUT.PUT_LINE('col_type = '
    || rec.col_type);
    DBMS_OUTPUT.PUT_LINE('col_maxlen = '
    || rec.col_max_len);
    DBMS_OUTPUT.PUT_LINE('col_name = '
    || rec.col_name);
    DBMS_OUTPUT.PUT_LINE('col_name_len = '
    || rec.col_name_len);
    DBMS_OUTPUT.PUT_LINE('col_schema_name = '
    || rec.col_schema_name);
    DBMS_OUTPUT.PUT_LINE('col_schema_name_len = '
    || rec.col_schema_name_len);
    DBMS_OUTPUT.PUT_LINE('col_precision = '
    || rec.col_precision);
    DBMS_OUTPUT.PUT_LINE('col_scale = '
    || rec.col_scale);
    DBMS_OUTPUT.PUT('col_null_ok = ');
    IF (rec.col_null_ok) THEN
    DBMS_OUTPUT.PUT_LINE('true');
    ELSE
    DBMS_OUTPUT.PUT_LINE('false');
    END IF;
    END;
    BEGIN
    c := DBMS_SQL.OPEN_CURSOR;
    
    DBMS_SQL.PARSE(c, nvl(:P17_QUERY, 'select null from dual where 1 = 2'), DBMS_SQL.NATIVE);
    
    d := DBMS_SQL.EXECUTE(c);
    
    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    
    col_num := rec_tab.first;
    IF (col_num IS NOT NULL) THEN
    LOOP
    v_columns := v_columns ||':'|| (rec_tab(col_num).col_name);
    col_num := rec_tab.next(col_num);
    EXIT WHEN (col_num IS NULL);
    END LOOP;
    END IF;
    
    DBMS_SQL.CLOSE_CURSOR(c);
    v_columns := ltrim(v_columns, ':');
    return v_columns;
    END;

    Here is the app example: SQL Command.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  2. Asked: March 17, 2022

    Calling Application_process on a Modal page

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on March 17, 2022 at 3:48 pm

    Try to use region URL type and place the application process in the Attribute > URL property. Also, specify the width and height as width="99%" height="1000" in iframe attribute property.

    Try to use region URL type and place the application process in the Attribute > URL property. Also, specify the width and height as width="99%" height="1000" in iframe attribute property.

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  3. Asked: March 15, 2022

    How to prevent year entering as 0022 in oracle forms 6i

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on March 16, 2022 at 6:50 am

    You will have to put the validation to prevent it. For example: Begin if substr(to_char(:yourblock.dateitem, 'dd/mm/yyyy'), 7, 2) = '00' then -- give message raise form_trigger_failure; end if; End;  

    You will have to put the validation to prevent it. For example:

    Begin
      if substr(to_char(:yourblock.dateitem, 'dd/mm/yyyy'), 
              7, 2) = '00' then
          -- give message 
          raise form_trigger_failure;
      end if;
    End;

     

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  4. Asked: February 6, 2022

    How to display HTML from table with PL/SQL Dynamic Content region?

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on February 7, 2022 at 7:44 am

    I am assuming that your HTML data is stored in the CLOB data. You can check the below link to how to display clob data in the Oracle Apex region. Display CLOB data in a Region. It displays the data on click, you can modify it to display on page load or any other event.

    I am assuming that your HTML data is stored in the CLOB data. You can check the below link to how to display clob data in the Oracle Apex region.

    Display CLOB data in a Region.

    It displays the data on click, you can modify it to display on page load or any other event.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  5. Asked: November 3, 2021

    "Actions" in Dynamic Action are not running in Sequence

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on November 4, 2021 at 6:49 am

    Dynamic actions will be executed in the sequence they created. But executing JavaScript code is a client-side action, and the PL/SQL one is server-side. DA will execute the JS first and then will immediately execute the PL/SQL. So both will execute at almost the same time. To execute PL/SQL code aftRead more

    Dynamic actions will be executed in the sequence they created. But executing JavaScript code is a client-side action, and the PL/SQL one is server-side. DA will execute the JS first and then will immediately execute the PL/SQL. So both will execute at almost the same time.

    To execute PL/SQL code after JS, you can use the following trick:

    From JS code, set a value of a hidden item (create a new hidden item) and write a DA to execute PL/SQL code on the change value of that hidden item.

    Using this method, the JS code will execute first, and when that code sets a value of a hidden item, then only PL/SQL code will run.

     

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  6. Asked: October 8, 2021

    Interactive Report Summary based on filter

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on October 9, 2021 at 4:46 pm

    Instead of the default search bar, try to build them a custom search bar for the interactive report. That way you would be able to access the searched values.

    Instead of the default search bar, try to build them a custom search bar for the interactive report. That way you would be able to access the searched values.

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  7. Asked: October 4, 2021

    How to Show numeric key paid on number field

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Replied to answer on October 5, 2021 at 11:19 am

    Check this tutorial: Add jQuery.Numpad to Numeric Fields.

    Check this tutorial: Add jQuery.Numpad to Numeric Fields.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  8. Asked: October 4, 2021

    ORDS: An unexpected error with the following message occurred: null

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on October 4, 2021 at 2:18 pm

    Try with the following code: Declare b_blob blob; p_cod_input varchar2(50) := 'INLP'; n_len number; BEGIN cpl_load.xlsx_builder_Pkg.clear_workbook; -- cpl_load.xlsx_builder_pkg.new_sheet ('test'); cpl_load.xlsx_builder_pkg.query2sheet (p_sql => 'select * from emp', p_sheet => 1); b_blob := cplRead more

    Try with the following code:

    Declare
    b_blob blob;
    p_cod_input varchar2(50) := 'INLP';
    n_len number;
    BEGIN
    cpl_load.xlsx_builder_Pkg.clear_workbook;
    --
    cpl_load.xlsx_builder_pkg.new_sheet ('test');
    cpl_load.xlsx_builder_pkg.query2sheet (p_sql => 'select * from emp', p_sheet => 1);
    
    b_blob := cpl_load.xlsx_builder_pkg.finish;
    
    n_len := dbms_lob.getlength(b_blob);
    htp.flush;
    htp.init;
    
    owa_util.mime_header('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', false);
    htp.p('Content-length: '||n_len);
    htp.p('Content-Disposition: attachment; filename="abc.xlsx"');
    htp.p('Set-Cookie: filedownload=true; path=/');
    
    owa_util.http_header_close;
    
    WPG_DOCLOAD.DOWNLOAD_FILE( b_blob );
    END;
    
    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  9. Asked: October 1, 2021

    How to display login name in application navigation bar?

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Added an answer on October 2, 2021 at 7:12 am

    What computation point you selected? Maybe you need to logout and login again to see the effect. Or select the computation point before header.

    What computation point you selected?

    Maybe you need to logout and login again to see the effect.

    Or select the computation point before header.

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
  10. Asked: September 30, 2021

    Oracle APEX Set CSS style to Red color for numbers less than 0 with JAVASCRIPT

    Vinish

    Vinish

    • 1 Question
    • 847 Answers
    • 74 Best Answers
    • 4k Points
    View Profile
    Vinish Enlightened
    Replied to answer on September 30, 2021 at 10:43 am
    This answer was edited.

    This is great 👍. So finally it can be called as: $('input').each(function(){ if ($.isNumeric(getNumberFromCurrency($v(this)))) { if (parseFloat(getNumberFromCurrency($v(this)),10) < 0) { $(this).css({'color':'red'}) } } }).on('blur', function() { if ($.isNumeric(getNumberFromCurrency($v(this))))Read more

    This is great 👍. So finally it can be called as:

    $('input').each(function(){
        if ($.isNumeric(getNumberFromCurrency($v(this)))) {
            if (parseFloat(getNumberFromCurrency($v(this)),10) < 0) {
               $(this).css({'color':'red'})
            }
        }
    }).on('blur', function() {
    if ($.isNumeric(getNumberFromCurrency($v(this)))) {
            if (parseFloat(getNumberFromCurrency($v(this)),10) < 0) {
               $(this).css({'color':'red'})
            }
        }
    });
    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
1 2 3 … 8

Sidebar

Ask Question
Write a Tutorial

Recent Blog Posts

  • Vinish

    What is Oracle ERP?

  • Vinish

    The Benefits of Unit Testing

  • Vinish

    Java OOPS Concepts MCQ Quiz

  • Vinish

    What is the Best Database to Use?

  • Vinish

    Sending Query Strings in Post Requests in C#

Explore

  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • Image to Base64
  • PL/SQL Beautifier

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
© 2021 OrclQA.Com. All Rights Reserved.
Privacy Policy - About Us