Friday, February 26, 2021

How to Show row header For Cross Tab Report In Crystal Reports

Dumay Group 
Create Formula 

whilereadingrecords;
stringvar array grp := ["A","B","C"];
numbervar i := i + 1;
numbervar j := ubound(grp);
stringvar k;

if i <= j then(
redim preserve grp[j];
k := grp[i]
);
k

Monday, February 22, 2021

How to create random password in oracle database

SQL> set serveroutput on

SQL> DECLARE

  2    l_passwd VARCHAR2(40);

  3  BEGIN

  4    l_passwd := DBMS_RANDOM.string('a',10) || DBMS_RANDOM.string('x',10) || '1#';

  5    -- Remove CONTAINER=ALL for non-CDB environments

  6    DBMS_OUTPUT.PUT_LINE(l_passwd);

  7    --EXECUTE IMMEDIATE 'ALTER USER anonymous IDENTIFIED BY ' || l_passwd || ' ACCOUNT UNLOCK CONTAINER=ALL';

  8  END;

  9  /

nqhZxILnruA2JHHR0BOL1#


PL/SQL procedure successfully completed.


SQL> ed

Wrote file afiedt.buf


  1  DECLARE

  2    l_passwd VARCHAR2(40);

  3  BEGIN

  4    l_passwd := DBMS_RANDOM.string('a',5) || DBMS_RANDOM.string('x',5) || '1#';

  5    -- Remove CONTAINER=ALL for non-CDB environments

  6    DBMS_OUTPUT.PUT_LINE(l_passwd);

  7    --EXECUTE IMMEDIATE 'ALTER USER anonymous IDENTIFIED BY ' || l_passwd || ' ACCOUNT UNLOCK CONTAINER=ALL';

  8* END;

SQL> /

aulAuPBYEG1#


PL/SQL procedure successfully completed.


SQL> /

oUBLDJWQIK1#


PL/SQL procedure successfully completed.


Saturday, February 13, 2021

How to Configure ICON in Oracle Forms 10g | Muhammad Abdul Quium (V-76)

 


How to view sql*plus service status

SQL>> show all

  1. appinfo is OFF and set to "SQL*Plus"
  2. arraysize 15
  3. autocommit OFF
  4. autoprint OFF
  5. autorecovery OFF
  6. autotrace OFF
  7. blockterminator "." (hex 2e)
  8. btitle OFF and is the first few characters of the next SELECT statement
  9. cmdsep OFF
  10. colinvisible OFF
  11. colsep " "
  12. compatibility version NATIVE
  13. concat "." (hex 2e)
  14. copycommit 0
  15. COPYTYPECHECK is ON
  16. define "&" (hex 26)
  17. describe DEPTH 1 LINENUM OFF INDENT ON
  18. echo OFF
  19. editfile "afiedt.buf"
  20. embedded OFF
  21. errorlogging is OFF
  22. escape OFF
  23. escchar OFF
  24. exitcommit ON
  25. FEEDBACK ON for 6 or more rows
  26. flagger OFF
  27. flush ON
  28. fullcolname OFF
  29. heading ON
  30. headsep "|" (hex 7c)
  31. history is OFF
  32. instance "local"
  33. linesize 80
  34. lno 14
  35. loboffset 1
  36. lobprefetch 0
  37. logsource ""
  38. long 80
  39. longchunksize 80
  40. markup HTML OFF HEAD "SQL*Plus Report" BODY "" TABLE "border='1' width
  41. ='90%' align='center' summary='Script output'" SPOOL OFF ENTMAP ON PREFORMAT OFF
  42. markup CSV OFF DELIMITER , QUOTE ON
  43. newpage 1
  44. null ""
  45. numformat ""
  46. numwidth 10
  47. pagesize 14
  48. PAUSE is OFF
  49. pno 0
  50. recsep WRAP
  51. recsepchar " " (hex 20)
  52. release 1202000100
  53. repfooter OFF and is NULL
  54. repheader OFF and is NULL
  55. rowprefetch 1
  56. securedcol is OFF
  57. serveroutput OFF
  58. shiftinout INVISIBLE
  59. showmode OFF
  60. spool OFF
  61. sqlblanklines OFF
  62. sqlcase MIXED
  63. sqlcode 0
  64. sqlcontinue "> "
  65. sqlnumber ON
  66. sqlpluscompatibility 12.2.0
  67. sqlprefix "#" (hex 23)
  68. sqlprompt "SQL> "
  69. sqlterminator ";" (hex 3b)
  70. statementcache is 0
  71. suffix "sql"
  72. tab ON
  73. termout ON
  74. timing OFF
  75. trimout ON
  76. trimspool OFF
  77. ttitle OFF and is the first few characters of the next SELECT statement
  78. underline "-" (hex 2d)
  79. USER is "HRM"
  80. verify ON
  81. wrap : lines will be wrapped
  82. xmloptimizationcheck OFF


SQL>

Wednesday, February 10, 2021

Oracle Function List

LISTAGG

SELECT job_id, LISTAGG(last_name,',') WITHIN GROUP(ORDER BY last_name) AS employee
FROM employees
GROUP BY job_id
ORDER BY job_id
/



JOB_ID              EMPLOYEES
-----------------------------------------------------------------------------------------------------------------
PU_CLERK
Baida,Colmenares,Himuro,Khoo,Tobias

PU_MAN
Raphaely

SA_MAN
Cambrault,Errazuriz,Partners,Russell,Zlotkey

SA_REP
Abel,Ande,Banda,Bates,Bernstein,Bloom,Cambrault,Doran,Fox,Grant,Greene,Hall,Hutton,Johnson,King,Kumar,Lee,Livingston,Marvins,McEwen,Olsen,Ozer,Sewall,Smith,Smith,Sully,Taylor,Tucker,Tuvault,Vishney

SH_CLERK
Bell,Bull,Cabrio,Chung,Dellinger,Dilly,Everett,Feeney,Fleaur,Gates,Geoni,Grant,Jones,McCain,OConnell,Perkins,Sarchand,Sullivan,Taylor,Walsh

ST_CLERK
Atkinson,Bissot,Davies,Gee,Ladwig,Landry,Mallin,Markle,Marlow,Matos,Mikkilineni,Nayer,Olson,Patel,Philtanker,Rajs,Rogers,Seo,Stiles,Vargas



Tuesday, February 9, 2021

How to generate Oracle Apex Barcode

Declare 

VTotal number;

begin

VTotal:=nvl(:P1_qty,0);

for i in 1..VTotal

loop

htp.p('<img style="height:60px;" src="https://barcode.tec-it.com/barcode.ashx?data='||:P11_BARCODE_NUMBER||'" alt="barcode"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');

end loop;

htp.p(' </div>');

end;


Thursday, February 4, 2021

How to setup Step by Step OBIEE 12C Installation on Windows



Step by Step OBIEE 12C Installation on Windows – BI Publisher installation, BI Analytic Installation
http://www.catgovind.com/obiee/step-by-step-obiee-12c-installation-on-windows-oracle-bi-publisher-installation-and-oracle-bi-analytic-installation/



In this section, I have explained OBIEE 12C installation on a Windows Machine. The following bi components will get covered in this section
Oracle BI Publisher installation
Oracle BI Analytics installation
Essbase
Pre-Requisite
Oracle Enterprise Edition Database installation
JDK 8 Update 51 Installation
Fusion Middleware 12.2.1 Installation
Following are the series of steps covered in this section
Download & Unzip OBIEE 12.2.1
OBIEE 12.2.1 Installation
Create BI Schemas using RCU utility
Set Environment Variable for BI
Create a BI Domain
Verify Oracle Business Intelligence URL’s
Start & Stop BI Server
1). Download & Unzip OBIEE 12.2.1
1.1) Go to Oracle BI download URL, Accept the license, and download the Windows downloads File1 & File2



1.2) Unzip the two zip two files in a folder as shown below





2). OBIEE 12.2.1 Installation


2.1) Right click on the BI Installer and select Run as Administrator





2.1) The BI Installer opens on the screen





2.3) Click the button Next on the installer





2.4) Input the Oracle support credentials if you have for automatic updates or skip it





2.5) Input the Middleware home. This is the folder where you installed Fusion Middleware 12.2.1. Look at Fusion Middleware installation on step 7





2.6) Toggle on BI Platform Distribution with Samples


Note: If you are installing it on a DEV box, I would suggest to install it. It has plenty of samples to refer





2.7) Click the button Next





2.8) Click on the button Install





2.9) Click Next once it went 100%





2.10) Click Close to complete the setup





3). Create BI Schemas using RCU utility


3.1) Go to <MW_HOME>\oracle_common\bin and double click on the rcu.bat





3.2) Click on the button Next





3.3) Click Create Repository and click Next





3.4) Select your database and input the SYSDBA credentials





3.5) Click Ok on the pop-up





3.6) Input a prefix and enable Oracle Business Intelligence
Note: The prefix in Create New Prefix is important. You need this prefix while creating a BI domain





3.7) Click Ok on the pop-up





3.8) Input a password for the BI schema Password
Note: Save this password. You need this while creating BI domain





3.9) Accept the default or double click on the tablespace to select your database. Click Next





3.10) Click Ok on Repository Creation Utility – Confirmation pop-up





3.11) Click Create on Repository Creation Utility





3.12) Click Ok





3.13) Click Close once it was done





4). Set Environment Variable for BI


4.1) Open your control panel >> System >> Advanced System Settings >> Advanced >> Environment Variables >> Add the variable BI_PRODUCT_HOME points to your <MW_HOME>\bi folder





5). Create a BI Domain


5.1) Go to <MW_HOME>bi\bin folder and run config.cmd





5.2) The Oracle Business Intelligence 12C Configuration Assistant opens on the screen. Select the option you want
Essbase => OLAP server
Business Intelligence Enterprise Edition => BI Analytics
Business Intelligence Publisher => BI Publisher





5.3) Click Next





5.4) Input a BI domain name & WebLogic username and password





5.3) Select Use existing schema and input your database connection string
Simple Connect String: localhost:1521:orcl (Sample Format)
Prefix: Mentioned in step 3.6
Password: Mentioned in step 3.8






5.4) Input a port range, so BI will choose port number for WebLogic admin server and BI servers
Port Range Starting Port: Port From
Port Range End Port: Port To





5.5) Select the Oracle Sample application (SampleAppLite) & click Next
Note: By selecting the SampleAppLite, BI Analytic display predefined dashboard. Useful in DEV server for reference





5.6) Click Configure





5.7) The Bi domain configuration will get started. It would take 15-30 minutes depend on your process speed





5.8) You may receive multiple pop-ups during this process. Click Allow access





5.9) Click Next once it went 100%





5.10) Scroll down and look at the port numbers before closing the wizard. Click Finish to exit the setup





6) Verify Business Intelligence URL’s


6.1) Verify the BI Analytic URL. The URL will be like HTTP://<HOSTNAME>:<PORT>/analytics. Enter your WebLogic credentials and login
Note: The port number is mentioned in step 5.10





6.2) To see the sampleAppLite dashboard, Select the Dashboard dropdown and select anything under Sample Lite





6.3) The BI analytics SampleAppLite dashboard





6.4) Open BI Publisher URL with WebLogic credentials. The default URL will look like http://<HOSTNAME>:<PORT>/xmlpserver





6.5) Open a sample report





6.6) The sample BI Publisher report





6.7) Go to Visual Analyzer URL and login with your WebLogic username and password



6.8) BI Visual Analyzer dashboard. The default URL will be http://localhost:9502/console





6.9) Verify the status of the Oracle Essbase application. The URL will be like http://localhost:9502/aps/Essbase





6.10) Login into WebLogic console with your WebLogic username and password. The default URL is http://localhost:9500





6.11) Login into WebLogic Enterprise manager with your WebLogic username and password. The default URL is http://localhost:9500/em





7) Start & Stop BI Server


7.1) Go to <MW_HOME>\user_projects\<DOMAIN_NAME>\bi\bitools\bin and run the command as shown below
Start.cmd => Start BI Server
Stop.cmd => Stop BI Server
Status.cmd => Status





For Example, Double click on status.cmd will give BI status like below





What Next?
-----Installation Compleated-----


How to set up a Data Source in BI Publisher
Before start developing a report, the data source must be setup in BI Publisher. The data source is simply a database connection the report is looking for data to generate reports. For example, a user wants to generate a report that displays the list of countries. Here the list of countries may come from a database table.
In this section, we detailed how to set up a data source in BI Publisher 12C.
Version User: Bi Publisher 12.2.1


Setup Data Source in BI Publisher


1. Login into XMLPSERVER as WebLogic admin. The default user is http://HOST:PORT/xmlpserver





2. Click on the link Administrator on the top right corner





3. Click JDBC Connection under Data Sources





4. Click the button Add Data Sources. You can create multiple data sources





5. Enter your database connection details that you are going to generate a report. Also, input pre/post process function if any. That’s it.We are done.


Pre Process Function: Enter a PL/SQL function that you want to execute when a database connection is created. The function must return a Boolean
Post Process Function: Enter a PL/SQL function that you want to execute when a database connection is closed. The function must return a Boolean


Note: I have entered the HR schema here which is a demo schema bundled with Oracle database. By default this is locked, to unlock it, log in to your database as system user and issue the query





1
2
3


ALTER USER hr ACCOUNT UNLOCK IDENTIFIED BY hr;









How to create report in bi publisher





This section we walk through on create report in BI Publisher. The following are the summary of steps needed to create a Oracle BI report
1. Create a Data Model in BI Publisher
2. Create a Report in BI Publisher

Pre-Requisite


A data source must be established before creating a data model or report. Click on the link to create an HR Data source connection in BI Publisher


1. Create a Data Model in BI Publisher
A data model is a collection of object work together to produce data for a report to generate.A data model requires data to read; it might be a database table, excel file, LDAP, etc. For this sample report creation, we have used HR schema COUNTRIES table to pull the country names. Let’s begin to create a Data Model in BI Publisher
1. Login into BI Publisher as BI Administrator





2. Click New and select Data Model from the drop down





3. Click on the Save icon to save the data model, create a folder and input a folder name for where you want to save the data model, input a data model name and Click Save





4. Now click Add and select SQL Query





5. Input a name, Select the data source as HR (See Prerequisite), Click On the Query Builder, Select Country table, Select the field Country Name. Click Save and Ok again. The BI Publisher wrote the query for you.





6. Click on the DATA tab, Click View and & Click Save a Sample Data





7. Click on the properties, ensure the sample.xml will be present, and click Save





We are done creating a data model.

Create a Report in BI Publisher
A report is simply read data from a data model and visualize in a graphical report. BI Publisher supports many visual formats like chart, graphs, table etc. For this demo purpose, we read the country names from the data model and display it in a table.
Let’s begin to create a BI Publisher report


8. Click New and select Report





9. Choose the Data Model you just created above and open it





10. Select the table and click Next





11. Choose the Country_Name & Click Next





12. Click View Report & Click Finish





13. Save the BI Publisher report with the same name in the same folder where you saved the Data Model





14. The BI Publisher Report run immediately. Change the report output if you want. That’s it we are done creating and running BI Publisher report





15. Click on the Catalog, select the folder where you created the data model and report. Click Open to run the BI Publisher report again and edit to modify it further. J


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