How to Install Oracle Forms & Reports 11g | DB 11g | Windows 10 part 4
Автор: Omar Baig عمر بیگ
Загружено: 2021-10-11
Просмотров: 339
Today we are going to Install Oracle Forms & Reports 11g with Database 11g in Windows 10 InshaAllah. part 4
Patreon: / omarbaig
a. Query will be look like this
SELECT *
FROM employees e
WHERE e.salary BETWEEN NVL(:R_SALARY_FROM, e.salary) AND NVL(:R_SALARY_TO, e.salary)
so that "Report" will run without parameters
b. Come to "File" tab & hit "Save As..." option.
c. Assign path "D:\Oracle_Forms_and_Reports_11g\11g_Project\Reports", Name "OBReport" from your choice, select "Reports Binary" from "Save as type:" drop down & hit "Save" button.
d. Navigate to "Data Model", "User Parameters", click on "R_SALARY_FROM" & "R_SALARY_TO" parameter & press "F4"
e. Select "Number" from "Datatype" drop down & assign "9" to "Width" for both parameters.
Integration of Oracle Reports with Oracle Forms
a. Open "Form Builder"
b. Press F2
c. Create 2 Text Items while clicking on "Text Item" from "Tool Palette"
d. Define their "Names", "Data Type", "Maximum Length" while clicking "F4". (F_SALARY_FROM, F_SALARY_TO, NUMBER, 9)
e. Define "Format Mask" which will look like "999999.99"
f. Create 1 Button while clicking on "Button" from "Tool Palette" & define Name & "Label" for it. (CALL_REPORT, Call Report)
g. Come to "File" tab & hit "Save As..." option.
h. Define "File name:" from your choice, "Save as type:" will be "*.fmb" hit "Save" button. (OBReportForm)
i. Click on "Reports" hit "+" button.
j. Check on "Use Existing Report File" option
k. Press "Browse" button.
l. Come to "Reports" folder & select "OBReport"
m. Hit "OK" button
n. Assign "Name" & remove path from "Filename", only report name will be mention like "OBReport.rdf"
o. Save it.
p. Right Click on "Call Report" Button come to "SmartTriggers & select "WHEN-BUTTON-PRESSED", assign this code
DECLARE
vc_reportserver varchar2(256) := 'rep_adminserver_laptop-cc48th9l_asinst_1';
vc_runformat varchar2(256) := 'pdf';
v_report_id Report_Object;
vc_reportoj varchar2(256) := 'EMPLOYEE';
vc_ReportServerJob VARCHAR2(100); /* unique id for each Report request */
vc_rep_status VARCHAR2(100); /* status of the Report job */
vjob_id VARCHAR2(100); /* job_id as number only string*/
BEGIN
/* Get a handle to the Report Object */
v_report_id:= FIND_REPORT_OBJECT(vc_reportoj);
/* Define the report output format and the name of the Reports Server as well as a user-defined parameter.
Pass the department number from Forms to Reports. There is no need for a parameter form to be displayed,
so paramform is set to “no”.*/
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,vc_runformat);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER,vc_reportserver);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER,'R_SALARY_FROM=' || :F_SALARY_FROM || ' R_SALARY_TO=' || :F_SALARY_TO || ' paramform=no');
vc_ReportServerJob:=RUN_REPORT_OBJECT(v_report_id);
vjob_id := substr(vc_ReportServerJob,instr(vc_ReportServerJob,'_',-1)+1);
/* Check the report status. Because this was a synchronous call ( REPORT_COMM_MODE),
the status check will only return FINSIHED or an error. If COMM_MODE is set to “asynchronous”, a timer
should be used to periodically change the status of the running report before attempting to display it. */
vc_rep_status := REPORT_OBJECT_STATUS(vc_ReportServerJob);
IF vc_rep_status = 'FINISHED' THEN
/* Call the Reports output to be displayed in the browser. The URL for relative addressing is valid
only when the Reports Server resides on the same host as the Forms Server and is accessed via the same port.
For accessing a remote Reports environment, you must use a fully qualified URL (i.e. http://hostname:port ) */
WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid'|| vjob_id ||'?server='||vc_reportserver,'_blank');
ELSE
message ('Report failed with error message '||vc_rep_status);
END IF;
END;
q. Define Report Name to "vc_reportoj" (EMPLOYEE)
r. Define Parameters. (Form & Reports Parameters are :F_SALARY_FROM, :F_SALARY_TO, R_SALARY_FROM, R_SALARY_TO respectively)
s. Define Server Name (rep_adminserver_laptop-cc48th9l_asinst_1)
t. Press "Windows+R" type "Regedit" & hit "OK" button.
u. Navigate to "HKEY_LOCAL_MACHINE, SOFTWARE, ORACLE", come to "KEY_OH1290047565", select "REPORTS_PATH" press "End" button, press ";", copy path where "OBReport" is available "D:\Oracle_Forms_and_Reports_11g\11g_Project\Reports" & paste it to "REPORTS_PATH", & press "OK" button.
v. Open Firefox & use this command "http://laptop-cc48th9l:7001/reports/rwservlet/startserver"
w. Run Form (Ctrl+R)
x. Provide value for both parameters & press "Call Report" button.
y. We have to stop "Weblogic Admin Server" then start it again.
z. Save form
#OmarBaig #OracleFormsReports11g #ParameterForm #OracleFormsReports11gInstallation
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: