بتاريخ: 23 نوفمبر 200421 سنة comment_18777 كيف نخرج تقرير بشكل دورى كل فتره زمنيه بدون استدعائه من خلال زر ويحفظ فى مجلد مخصص لذلك ولكن فى صيغة ملف ورد تقديم بلاغ
بتاريخ: 23 نوفمبر 200421 سنة comment_18778 عليك ان تتعرف على الdbms_jobوضيفة هذه الباكج تنفيذ عمل معين حسب الفترة التي تحددها لهايجب عليك ان تعرف كيف تشغل التقرير من الداتا بيز واليك يا سيدي التالي 11.3 Invoking a Report From a Database EventDatabase triggers are the primary mechanism for invoking reports using theEvent-Driven Publishing API. The Oracle database allows you to define variousscopes of triggers that fire in response to various events. To submit adatabase-driven job, you use the code described in the previous sections within adatabase trigger.There are many ways to use event-driven publishing. One way is to create securityprotocols using a trigger that fires whenever a grant is done or a user logs on or off.Another way is to create automated processes that respond to certain types ofchanges to data in a table. For example, a database trigger could fire when thestatus of an expense report changes to DONE; in turn, a report could automaticallybe sent to an employee's manager.For example:CREATE TRIGGER EXP_REP_TRGAFTER INSERT OR UPDATE on EXP_REP FOR EACH ROWmyPlist SRW_PARAMLIST;myIdent SRW.Job_Ident;BEGINIF (:new.ExpStat = 'DONE') THENmyPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));srw.add_parameter(myPlist,'GATEWAY','http://…');srw.add_parameter(myPlist,'SERVER','fooSVR');srw.add_parameter(myPlist,'REPORT','foo.RDF');srw.add_parameter(myPlist,'USERID','foo/bar');srw.add_parameter(myPlist,'ExpenseID',:new.ExpID);myIdent := srw.run_report(myPlist);END IF;END;This trigger will fire after each update on the EXP_REP table. In the event the statuschanges to DONE, the report request is run.If you want your request to run against a key specified in the cgicmd.dat file,specify the CMDKEY parameter in lieu of the REPORT parameter. If the key containsuser ID information, you can omit the USERID parameter as well. For example:CREATE TRIGGER EXP_REP_TRGAFTER INSERT OR UPDATE on EXP_REP FOR EACH ROWmyPlist SRW_PARAMLIST;myIdent SRW.Job_Ident;BEGINIF (:new.ExpStat = 'DONE') THENIntegrating with Oracle9i Advanced QueuingEvent-Driven Publishing 11-9myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));srw.add_parameter(myPlist,'GATEWAY','http://…');srw.add_parameter(myPlist,'SERVER','fooSVR');srw.add_parameter(myPlist,'CMDKEY','keyvalue');srw.add_parameter(myPlist,'ExpenseID',:new.ExpID);myIdent := srw.run_report(myPlist);END IF;END;Additionally, if you have defined an advanced distribution model via a distributionXML file, you can specify that file with the DIST parameter. For example:CREATE TRIGGER EXP_REP_TRGAFTER INSERT OR UPDATE on EXP_REP FOR EACH ROWmyPlist SRW_PARAMLIST;myIdent SRW.Job_Ident;BEGINIF (:new.ExpStat = 'DONE') THENmyPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));srw.add_parameter(myPlist,'GATEWAY','http://…');srw.add_parameter(myPlist,'SERVER','fooSVR');srw.add_parameter(myPlist,'REPORT','foo.RDF');srw.add_parameter(myPlist,'USERID','foo/bar');srw.add_parameter(myPlist,'DISTRIBUTE','YES');srw.add_parameter(myPlist,'DESTINATION','filename.xml');srw.add_parameter(myPlist,'ExpenseID',:new.ExpID);myIdent := srw.run_report(myPlist);END IF;END;This is one way to move this kind of logic from your application into the databaseand use the database as a central storage for business processes.طريقك طويل بس رح تستفيد والله على ما اقول شهيد اما يا باشا التقارير الان اما ان تكون بصيغه html pdf rtfطيب شو رايك ناخذ صيغة rtf ولما تعمل داونلود على الكلينت حولها الى docولا تنسانا بدعاء صالح والى الامام جميعاً تقديم بلاغ
بتاريخ: 10 ديسمبر 200421 سنة كاتب الموضوع comment_20303 الف شكر اخ مصطفى وربنا يوفقق والى الامام دئما تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.