Oracle Application Blog

Configuring APEX to use BI Publisher

To use BI Publisher as your Report Server, first, access the Report Printing parameters:Go to The following navigation in APEX with Admin credentials. 1 Access the Administration Services home page 2 Select Manage Service 3 Select Instance Settings, under Manage Environment Settings 4 Click Report Printing to focus on just the Report Printing attributes Now, specify the following attributes:  Oracle BI Publisher: Advanced Support  Print Server Protocol: HTTP or HTTPS (depends on your configuration)  Print Server Host Address: the hostname for the machine where you installed BI Publisher – e.g. myhost.mycompany.com  Print Server Port: the port given at the end of the BI Publisher installation – e.g. 9704  Print Server Script: /xmlpserver/convert

Read More

Append the Data Base value to Tabular Form Select List

 Ajax(Application Process) used to Get the value from Data base Return value as node and attribute.  Example : l_Opt_Xml.firstChild.nodeValue and l_Opt_Xml.getAttribute(‘value’).  Create the Element of OPTION  Example : var l_Opt = document.createElement(“option”);  Add the OPTION to Target Select List and Append the OPTION to Target Select List  Example : pSelect.options.add(l_Opt); pSelect.appendChild(l_Opt);  Insert the select list content to OPTION and Append the select list content to OPTION  Example : l_Opt.innerText = pContent;l_Opt.appendChild(document.createTextNode(pContent));

Read More

Apex used to call the Oracle JOB scheduler and Java

l Create the html link on apex l Ajax(Application Process) used to call the DBMS_SCHEDULER then generate the job name l Ajax(Application Process) used to call the DBMS_SCHEDULER .CREATE_JOB then Execute the job name  Example :   select DBMS_SCHEDULER.GENERATE_JOB_NAME(‘hariharhomes’) into jobnames from dual; dbms_scheduler.create_job( job_name=>jobnames, job_type=>’executable’, job_action=>’/u01/app/oracle/product/10.2.0/ias/Apache/Apache/images/mani.sh’, enabled=>TRUE );

Read More

Report Generation from BI through APEX

Oracle APEX is user friendly for designing part as well as client side data entry and validation related things.Oracle BI Publisher is good for report output; it will give the output files like PDF, XLS etc, Very big advantage in BI Publisher is that can produce multiple output files as a report. With the option of Bursting.Bursting will be scheduled with the particular time interval, or can schedule by the time as per the report need.Template file is base for required output report. Because output will be produced based on the input template design.In APEX, under Shared components there is an option called Report Layouts, that is getting the input template file for report designing. That same navigation having the link called Report Queries, which is getting the query from user to generating report based on template and query.When the user clicking on the designed button, then the Report file will be generated based on template and query.The button option should be Download printable Report Query, and then only that printable option will work.

Read More

Create Customize POPUP LOV for APEX

Javascript Used to Get the Tabular Form Id Example : var eleTables = document.getElementsByTagName(“table”);for (var i=1;ivar tId = eleTables[i].id;if(tId.substring(0,7)!=”){if(tId.substring(0,7)==’report_’){var originalId = i;var tableIds = eleTables[i].id;tableId = tableIds;return tableId;} } }  Create the POPUP Image on tabular column  Example : var link = document.createElement(‘a’);var image = document.createElement(‘img’);var span = document.createElement(‘span’);link.setAttribute(‘href’,’javascript:genList0_f16_0(“‘+a1+'”,”‘+filters+'”)’);link.className=”dark”;image.setAttribute(‘src’,’/i/list_gray.gif’); Customize the Window open Example : w = open(“wwv_flow_utilities.gen_popup_list” +“?p_filter=” +“&p_name=” + escape(filters) + “&p_element_index=” + escape (a1) +“&p_form_index=” + escape(‘0’) + “&p_max_elements=” + escape(”) +“&p_escape_html=” + escape(”) + “&p_ok_to_query=” + escape(‘YES’) +“&p_flow_id=” + escape(appId) + “&p_page_id=” + escape(pageId) +“&p_session_id=” + escape(l_field) + “&p_eval_value=” + escape(”) +“&p_translation=” + escape(‘NO’) + “&p_lov_checksum=Dynamicchecksum“winLov”, “Scrollbars=1,resizable=1,width=400,height=450”);if (w.opener == null) w.opener = self; w.focus();Based on Custom POPUP(Head No Column) append the value to Select list(Product) and read only column(Description and Drawing No)Here Return value(M2595) also customized then return to Tabular Column.

Read More

Dynamically Generate the Checksum id to solve the apex vulnerability problem

 Ajax(Application Process) used call the Oracle Query of APEX_ITEM.MD5_CHECKSUMJava method of  Math.random used to get Random no  Random no used to get the Attribute value from Select list  Example : thisObj = objs[rand_no]; if(thisObj){ checksumId=thisObj.getAttribute(‘value’); return checksumId; Apex Generate the checksum id per day only one time, I have customized and generated the   checksum id per each page refresh. Here show the checksum id screenshot,

Read More

To put the Company logo in each APEX page

l Go to Shared Components then click the images link and upload the image to application. l Click the Definition write the image name to logo text field as #WORKSPACE_IMAGES#company_logo.gif l Go to Page Template and add the LOGO prefix at table

Read More

BI Bursting

One of the very good features of Oracle BI Publisher is its ability to burst and send the reports to multiple users simultaneously.Using BI Publisher’s bursting feature we can split a single batch report into individual reports to be delivered to multiple destinations. We can apply a different template, output format, delivery method, and locale to each split segment of our report. Example implementations include: Invoice generation and delivery based on customer-specific layouts and delivery preference Financial reporting to generate a master report of all cost centers, bursting out individual cost center reports to the appropriate manager Generation of pay slips to all employees based on one extract and delivered via e-mail Enabling a Report for BurstingPrerequisite: A report defined in BI Publisher. The report data must contain an element by which the report will be split and an element by which the report will be delivered.Enabling a report for bursting consists of the following steps: Open the report in Edit mode. Select Bursting under the report definition. Select the Enable Bursting check box. Select the Split By and Deliver By elements. The Split By element is the data element from the report file that you wish to split the report by. For example, to split a batch of invoices by each invoice, you may use an element called CUSTOMER_NAME.The Deliver By element is the data element from the report file by which to determine the delivery method. In the invoice example, it is likely that each invoice will have delivery criteria determined by customer; therefore the Deliver By element may be CUSTOMER_ID. Select the data source for the delivery XML. The delivery XML can be sourced from the same data source as the main data set, or it can be generated from a different data source. Enter the SQL query to build the delivery XML. See Defining the Delivery Data Set for details. Defining the Delivery Data SetBased on the SQL query that we provide on the Bursting criteria page of the Report Editor, BI Publisher will build the delivery XML data set. The delivery XML data set contains the information to deliver the burst report appropriately to each recipient. The delivery data in this XML document is used as a mapping table for each Deliver By element. The structure of the delivery XML is as follows: Where KEY is the Delivery key and must match the Deliver By element. The bursting engine uses the key to link delivery criteria to a specific section of the burst data. TEMPLATE – is the name of the Layout template to apply. Note that the value is the Layout name (for example, “Invoice”), not the template file name (for example, invoice.rtf). TEMPLATE_FORMAT – is the format of the layout template. Valid values are: o RTFo PDFo ETEXTo XSL_FO LOCALE – is the template locale, for example, “en-US”. OUTPUT_FORMAT – is the output format. Valid values are: for example: pdf, html, excel. o HTMLo PDFo RTFo EXCEL DEL_CHANNEL – is the delivery method. Valid values are: o EMAILo FAXo FILEo FTPo PRINTo WEBDAV Delivery parameters by channel. The delivery parameters by channel are defined in the following table: Parameter Mapping

Read More

Table Partitioning

Every data’s should be stored in database, because world can’t run without storing the data’s in the database. Machinery world should store data’s in database for future reference and process, so the database will be filled up of data’s. The records will be more and more and the size of the data might be Tera bytes of ranges. These databases are known as Very Large Databases (VLDB). Oracle has provided the feature of table partitioning i.e. we can partition a table according to some criteria.For example we have an EMPLOYEE table with the following structureSuppose this table contains millions of records, but all the records belong to four years only i.e. 2007, 2008, 2009 and 2010.And most of the time we are concerned about only one or two years i.e. we give queries like the followingselect sum(salary) from sales where year=1991;select empName,sum(salary) from sales where year=1992Group by empName;Now whenever you give queries like this Oracle will search the whole table. If you partition this table according to year, then the performance is improve since oracle will scan only a single partition instead of whole table.CREATING PARTITION TABLESTo create a partition table gives the following statementcreate table employee(empid number(4),empName varchar2(10),salary number(10,2))partition by range (year)partition p1 values less than (2007) tablespace u1,partition p2 values less than (2008) tablespace u2,partition p3 values less than (2009) tablespace u3,partition p4 values less than (2010) tablespace u4,partition p5 values less than (MAXVALUE) tablespace u5;In the above example employee table is created with 5 partitions. Partition p1 will contain rows of year 2007 and it will be stored in tablespace u1.Partition p2 will contain rows of year 2008 and it will be stored in tablespace u2.Similarly p3 and p4.In the above example if we don’t specify the partition p4 with values less than MAXVALUE, then we will not be able to insert any row with year above 2010.Although not required, we can place partitions in different tablespaces. If we place partitions in different tablespaces then we can isolate problems due to failures as only a particular partition will not be available and rest of the partitions will still be available.The above example the table is partition by range.In Oracle we can partition a table by using the following partition methods,  Range Partitioning  Hash Partitioning  List Partitioning  Composite Partitioning ALTERING PARTITION TABLESTo add a partition we can add a new partition to the “high” end (the point after the last existing partition). To add a partition at the beginning or in the middle of a table, use the SPLIT PARTITION clause.For example to add a partition to employee table give the following command.alter table employee add partition p6 values less than (2008);To add a partition to a Hash Partition table give the following command.Alter table employee add partition;Then Oracle adds a new partition whose name is system generated and it is created in the default tablespace.To add a partition by user define name and in your specified tablespace give the following command.Alter table employee add partition p5 tablespace u5;To add a partition to a List partition table give the following command.alter table employee add partition empNamevalues (‘JONES’,’SMITH’);Any value in the set of literal values that describe the partition(s) being added must not exist in any of the other partitions of the table.

Read More

AP Invoice liability (Trial Balance) Query: R12 AP GL PO RCV XLA

SELECT   NVL (f.currency_code, d.invoice_currency_code) currency_code,         d.invoice_amount, d.wfapproval_status, d.invoice_num, d.invoice_id,         i.segment1 v_code, i.vendor_name,         NVL (d.invoice_amount, 0) – NVL (d.amount_paid, 0) amt,         SUM (a.acctd_rounded_cr) – SUM (a.acctd_rounded_dr) amount,         b.accounting_date, f.segment1 po_num, f.comments…

Read More