Monday, September 20, 2010

Drill Down/ Call Report From a Report.

To call a report from a report follow the below mentioned steps.

1) Select event on which drill down report will execute i.e. button, trigger etc.
2) Select SRW package i.e. Srw.Run _Report
Srw.Run_Report('Report= Client_Dtl Batch=NO Client_Id=' :PF_CLIENT_ID );
Where Client_Dtl is the child report , :PF_CLIENT_ID is the parameter for child report.

Note: Be careful about the apace because here it works as a separator.

Thursday, September 16, 2010

Icon Configuration In Oracle 9i/10gds Forms

When running an Oracle Forms application the icon files used must be in a web enabled format such as JPG or GIF (GIF is the default format). This is unlike older versions of forms running in client-server mode when the file format is .ico

1] Gather all the icon files in a directory.For this copy all the icons files (gif or jpg) to a folder e.g c:\icons or /tmp/icons folder 2] Create the jar including the icons. Change directory to the target icons folder: cd c:\icons or cd /tmp/icons

2a) Set jdk_Home
E.g. set Jdk_Home=E:\10Ghome\Jdk
2b) Set Path
E.g. Set Path=E:\10Ghome \jdk\bin;%PATH%2c) Jar the icon files issue: jar -cvf icons.jar * 3] Place the jar in \forms\java 4] Edit the \forms\server\formsweb.cfg 4a) Tell the applet to load the jar: archive_jini=xxall_jinit.jar,icons.jar 4b) Indicate the images are relative to forms/java virtual directory: imageBase=codeBase (Be careful about case as java is case sensitive)

Wednesday, July 14, 2010

Configuration of 10DGS Report Server

PURPOSE
-------
This note tells how to convert run_product to run_report_object while migratingfroms 6i to 10g because Run_product is not supported for web.
1) Create the table rw_server in your database.You can find the script in the
ORACLE_HOME\REPORT\ADMIN\SQL\rw_server.
2) Make sure that rp2rro.pll /plx is in the forms (registry) and you are able to generate the modified plx.
3) Use Migration assistant for conversion.
Run_product built in will be replaced to rp2rro.rp2rro_run_product and will creates parameters for the DESFORMAT,DESNAME,DESTYPE,SERVERNAME etc.
4). You need to give your correct reports server name in the SERVERNAME parameter
(RP2RROREPORTSERVER).
5) Make sure that the reports server is running or you can start it by using
rwserver server=Repserver from command prompt.
6) If you are running report on Web and if the output needs to be shown in the browser
window, then the reports DESTYPE should be set to CACHE or FILE and not SCREEN or
PREVIEW.
Note: If you are not using Migration assistance then you will have to manually change the name
of function “Run_Product” to “rp2rro.rp2rro_run_product”. Also you have to create the
fallowing parameters
In the calling form.
1) RP2RRODESFORMAT ( Set initial value =HTMLCSS)
2) RP2RRODESNAME
3) RP2RRODESTYPE ( Set initial value =CACHE)
4) RP2RROREPORTSERVER ( Set initial value =Your report server name)
5) RP2RROVIRTUALDIR ( Set initial value =/reports/)
6) RP2RROREPORTSINTERFACE ( Set initial value =rwservlet)

Tuesday, July 13, 2010

How to install WebUtil on 10.1.2.x OAS on Windows ?

Applies to:
Oracle Forms - Version: 10.1.2MS WindowsMicrosoft Windows
Goal
How to install WebUtil on 10.1.2.x OAS on Windows ?
Solution
1)- Download Webutil files from the following link: - Webutil version 1.0.6
( With Oracle developersuite 10.1.2.2 or higher , webutil 10.1.2.2.x will be automatically installed !)
It is not recommented to use with Forms 10.1.2.2 or higher webutil version 1.0.6 !
- WebUtil Demo from OTN
- The JACOB libraries version 1.8
2)- Copy the following files into %ORACLE_HOME%\forms\webutil :
(a) jacob.dll ---> included in jacob_18.zip
(b) ffisamp.dll ---> included in Webutil_demo.zip
(c) d2kwut60.dll ---> included in webutil_106.zip, under webutil subfolder
(d) JNIsharedstubs.dll ---> included in webutil_106.zip, under webutil subfolder
(e) sign_webutil.bat ---> included in webutil_106.zip, under webutil subfolder
Note: If files already exist then do not replace
3)- Copy the following files to %ORACLE_HOME%\forms\java :
a) webutil_106\java \forms_base_ie.js
b) webutil_106\java \forms_ie.js
c) webutil_106\java \frmwebutil.jar
d) jacob_18\jacob.jar
Note: If files already exist then do not replace
4)-Sign the "jacob.jar & frmwebutil.jar
- start the command prompt - cd %ORACLE_HOME%\forms\java
- set JDK_HOME=%ORACLE_HOME%\JDK - set PATH=%ORACLE_HOME%\jdk\bin;%PATH%
- set JINIT_HOME= C:\Program Files\Oracle\JInitiator 1.3.1.22 - %ORACLE_HOME% \forms\webutil\sign_webutil.bat %ORACLE_HOME%\forms\java\jacob.jar (For Jacob.jar)
- %ORACLE_HOME%\forms\webutil\sign_webutil.bat %ORACLE_HOME%\forms\java\frmwebutil.jar) (For frmwebutil.jar)


For Example:
E:> cd 10ghome\forms\java
E:\ 10ghome\forms\java> set JDK_HOME=E:\10GHOME\JDK
E:\ 10ghome\forms\java> set path=E:\10GHOME\jdk\bin;%PATH%
E:\ 10ghome\forms\java> set JINIT_HOME = C:\Program Files\Oracle\JInitiator 1.3.1.22
E:\ 10ghome\forms\java>E:\10GHOME\forms\webutil\sign_webutil.bat E:\10GHOME\forms\java\jacob.jar (For Jacob.jar)
E:\ 10ghome\forms\java>E:\10GHOME\forms\webutil\sign_webutil.batE:\10GHOME\forms\java\frmwebutil.jar
(For frmwebutil.jar)

Here make sure you have given the complete path for jarsigner tool and also JDK_HOME is set accordingly.
5)-Copy the following files from webutil_106\server to %ORACLE_HOME%\forms\server
- webutil.cfg
- webutilbase.htm
- webutiljini.htm
-webutiljpi.htm
Note: If files already exist then do not replace
6)- The following variable must be defined in %ORACLE_HOME%\forms\server\default.env:
WEBUTIL_CONFIG=\forms\server\webutil.cfg
7). The following jars must be included in the CLASSPATH in forms/server/default.env:
%ORACLE_HOME%\forms\java\frmall.jar;%ORACLE_HOME%\forms\java\frmwebutil.jar;%ORACLE_HOME%\forms\java\jacob.jar;%ORACLE_HOME%\jdk\jre\lib\rt.jar

8)- The configuration file formsweb.cfg should have the following section :
[webutil
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
archive_jini=frmall_jinit.jar
archive=frmall.jar
lookAndFeel=oracle


(Note that in default section we have to change the fallowing parameter
archive_jini=frmall_jinit.jar to archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar)

09)- The following virtual path must be defined in the %ORACLE_HOME%\forms\server\forms.conf file:
AliasMatch ^/forms/webutil/(..*) "%ORACLE_HOME%/forms/webutil/$1"
10)- Open webutil.cfg file and add the following line
Add the following line : install.syslib.0.user.1=ffisamp.dll409601.0true below these lines : install.syslib.0.7.1=jacob.dll942081.0true
install.syslib.0.9.1=JNIsharedstubs.dll655821.0true
install.syslib.0.9.2=d2kwut60.dll1925121.0true
12)- In the webutil.cfg file ensure you have the lines
transfer.appsrv.workAreaRoot=d:\temp transfer.appsrv.accessControl=FALSE (Default is TRUE)transfer.database.enabled=TRUE (Default is FALSE)transfer.appsrv.enabled=TRUE (Default is FALSE)13)- Run the script "create_webutil_db.sql" (included in webutil_106.zip file or in %ORACLE_HOME\forms ).
14)- Open forms builder and connect.Compile ALL" (shift-Control-K) form and webutil.pll ,then generate the fmx and plx using (Control-T).
(location of webutil.pll is %ORACLE_HOME\forms)

15) Attach the webutil.pll with form
16) Attach the webutil.olb with form (Open the object library drag the Webutil object into
objects groups)
17) Now replace Get_File_Name, Host and Text_IO with Client_Get_File_Name, Client_Host and Client_Text_IO.
18) Save and Compile the form.
Webutil Documentation 18)-You may also run the diagnostic test form described in the following note for furthur checking on the Webutil configuration : Note 553849.1Webutil Diagnostic Test Form For Checking Webutil Configuration

If Error Message After the configuration (oracle.forms.webutil.file.FileFunctions bean not foundWEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work)

The problem I found was that for some reason, in the formsweb.cfg file, the webutil section parameters are not all recognized. So if the parameter is in the default section of the file and then it is subsequently redefined within the webutil section, the duplicate parameters in the webutil section are igrnored. Therefore, I have to update archive_jini to archive_jini=frmall_jini.jar,frmwebutil.jar,jacob.jar (In default Section) and things came up working for me.

Wednesday, February 10, 2010

List of short keys Oracle form 10GDS:

Function Key
Block Menu Ctrl+B
Clear Block F7
Clear Field F5
Clear Form F8
Clear Record F6
Commit Ctrl+S
Count Query F12
Delete Record Ctrl+Up
Display Error Shift+Ctrl+E
Down Down
Duplicate Field Shift+F5
Duplicate Record Shift+F6
Edit Ctrl+E
Enter Query F11
Execute Query Ctrl+F11
Exit F4
Help Ctrl+H
Insert Records Ctrl+Down
List of Values Ctrl+L
List Tab Pages F2
Next Block Shift+PageDown
Next Field Tab
Next Primary Key Shift+F7
Next Record Down
Next Set Of Records Shift+F8
Previous Block Shift+PageUp
Previous Field Shift+Tab
Previous Record Up
Print Ctrl+P
Return Return
Scroll Down PageDown
Scroll Up PageUp
Show Keys Ctrl+K
Up UpUpdate Records Ctrl+U

Wednesday, February 3, 2010

Procedure To Send Email from oracle database

CREATE OR REPLACE PROCEDURE EEMAIL (p_smtp_hostname varchar2,p_smtp_portnum varchar2,p_from varchar2,p_recpt_1 varchar2,p_recpt_2 varchar2,subject VARCHAR2,MSG VARCHAR2)
IS
v_connection UTL_SMTP.CONNECTION;
v_header varchar2(1000);
crlf VARCHAR2(2):= UTL_TCP.CRLF;
--subject VARCHAR2(1000);
BEGIN
v_connection := utl_smtp.open_connection(p_smtp_hostname,p_smtp_portnum);
utl_smtp.helo(v_connection,p_smtp_hostname);
utl_smtp.mail(v_connection,p_from);
utl_smtp.rcpt(v_connection,p_recpt_1);
utl_smtp.rcpt(v_connection,p_recpt_2);
--utl_smtp.rcpt(v_connection,p_recpt_3);
v_header := 'Date: 'TO_CHAR(SYSDATE,'dd Mon yy hh24:mi:ss')crlf
'From: 'p_from''crlf
'Subject: 'subjectcrlf
'To: 'p_recpt_1crlf
'CC: 'p_recpt_2';'crlf;
-- 'CC: 'p_recpt_3crlf;
utl_smtp.open_data(v_connection);
utl_smtp.write_data(v_connection,v_header);
-- RFC 821 Format (SMTP) blank line between message header and message body
utl_smtp.write_data(v_connection,crlf);
utl_smtp.write_data(v_connection,MSGcrlfcrlf' ');

utl_smtp.close_data(v_connection);
utl_smtp.quit(v_connection);

/*EXCEPTION
WHEN UTL_SMTP.INVALID_OPERATION THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.INVALID_OPERATION','Invalid Operation in Mail attempt using UTL_SMTP.',SYSDATE);
COMMIT;
WHEN UTL_SMTP.TRANSIENT_ERROR THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.TRANSIENT_ERROR','Temporary e-mail issue - try again.',SYSDATE);
COMMIT;
WHEN UTL_SMTP.PERMANENT_ERROR THEN
INSERT INTO ERROR_UPLOAD_SQL_MSG (SQL_CODE,SQL_ERROR_MSG,ERROR_DATE)
VALUES ('UTL_SMTP.PERMANENT_ERROR','Permanent Error Encountered.',SYSDATE);
COMMIT;*/

-- END EMAIL_ERRORS;
END;
/