بتاريخ: 9 ديسمبر 200520 سنة comment_53766 السلام عليكمكيف يمكنني أن أشغل تقرير تم عمله باستخدام oracle report builder 9i من خلال oracle form builder 9i مثلا عندما أضط على زر في ال في form يتم تفعيل التقريرو لكم جزيل الشكر... تقديم بلاغ
بتاريخ: 18 ديسمبر 200520 سنة comment_54555 لأخي العزيز .. عليك بتنفيذ الآتي12 خطوة كما يليوهو منقول عن الأخ عمر باعقيل ومنفذ بإذن اللهوادعو لأخ عمر باعقيلالسلام عليكم قم بتطيق المثال التالي : This example is based on DEPT and EMP tables from SCOTT schema. You should create a new Reports Server Service for this example. 1) Create a simple report based on table EMP with a user parameter: select * from emp where emp.deptno = :pdeptno; 2) Open up the Property Inspector of user parameter PDEPTNO and specify the following: Name: pdeptno Datatype: Number Width: 20 Initial value: 20 (It can be any valid value) 3) Compile and save the report. Try to run it using 'Run Paper Layout' icon to make sure it works properly. 4) Create a simple form based on table DEPT: select * from dept; 5) Create a new reports server service as following (in Command Prompt): rwserver -install repserver90 autostart=yes 6) Open Property Palette for Reports object in the Forms Object Navigator and enter the following: Name: EMP Filename: C:reportsemp.rdf /*this path is included into REPORTS_PATH environment variable*/ Report Destination Type: CACHE Report Destination Format: HTML Report Server: repserver90 7) Open Layout Editor and create a push button 'Run-Report'. 8) Create a WHEN-BUTTON-PRESSED trigger with the following code: test_report; 9) Create a new procedure that you can call from the trigger as follows: PROCEDURE TEST_REPORT IS repid REPORT_OBJECT; v_rep VARCHAR2(100); rep_status VARCHAR2(20); BEGIN repid := find_report_object('report5'); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html'); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repserver90'); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:dept.deptno); v_rep := RUN_REPORT_OBJECT(repid); rep_status := REPORT_OBJECT_STATUS(v_rep); WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP rep_status := report_object_status(v_rep); END LOOP; IF rep_status = 'FINISHED' THEN /*Display report in the browser*/ WEB.SHOW_DOCUMENT('http:// 1)||'?'||'server=repserver90','_blank'); ELSE message('Error when running report'); END IF; END; 10) Compile the form. 11) Run the form, populate the record. 12) Click on the push button. Report will be displayed in a new browser window. Note that only records with the specific DEPTNO are displayed. That is because we passed parameter with a specific DEPTNO from the form to report تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.