9 Replies Latest reply: Sep 30, 2013 4:22 PM by 27ef7b04-d7fc-4325-919a-79352c7394c8 RSS

    Call 10g Report From Menu(.mmb)

    943136
      Hi All,

      I want to call a Simple 10g paper layout report from Menu.. How can I do this..
      I have searched a lot and didn't find any exact answer

      TIA
        • 1. Re: Call 10g Report From Menu(.mmb)
          Christian Erlinger
          Shouldn't be different from calling a report from somewhere else; you'd need a menu item type PL/SQL and there you put the code to call your report.

          cheers
          • 2. Re: Call 10g Report From Menu(.mmb)
            InoL
            You can only call a report with web.show_document(<full url to call a report>).
            Since you cannot attach a report object to a menu, you cannot use run_report_object.
            • 3. Re: Call 10g Report From Menu(.mmb)
              Christian Erlinger
              Since you cannot attach a report object to a menu, you cannot use run_report_object.
              Hmmm...but if I am using find_report_object in the Menu Module code it would try to find the given reports object in the current form which can be used to run the report...? Or am I completely off track?

              cheers
              • 4. Re: Call 10g Report From Menu(.mmb)
                InoL
                Actually, I never tried it this way (via a menu option), but I guess you are right.
                However, since a menu can be attached to many forms, the report object should also be included in every form. If you base every form on a template with a generic report object, it would probably work.
                • 5. Re: Call 10g Report From Menu(.mmb)
                  Christian Erlinger
                  The forms migration assistant will add a reports object called rp2rro on every form which previously issued run_product; if you didn't use it or have reports objects with different names then this is problematic.
                  I didn't launch it directly from a menu either; but I guess this shouldn't be different if you hide the procedure to call a report in some library somewhere and call it from whereever you like.

                  cheers
                  • 6. Re: Call 10g Report From Menu(.mmb)
                    943136
                    Well m using this simple code to call my paper layout report and I have mentioned it in the report node but it gives me the error
                    frm-41213 unable connect report server

                    DECLARE
                    report_id Report_Object;
                    ReportServerJob VARCHAR2(254);
                    BEGIN
                    report_id := find_report_object('emp');

                    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
                    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,CACHE);
                    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESFORMAT, 'PDF');
                    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,'Rep60_zubairit'); /*my report server name*/
                    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'p_deptno='||:Deptno||' paramform=no');

                    ReportServerJob := run_report_object(report_id);
                    END;

                    didnt get what the actual problem is..do i need to make any changes in reports folder located in developer folder??
                    TIA
                    • 7. Re: Call 10g Report From Menu(.mmb)
                      InoL
                      frm-41213 unable connect report server
                      Did you specify the correct server name ('Rep60_zubairit)?
                      Is the Report Server up and running?
                      • 8. Re: Call 10g Report From Menu(.mmb)
                        27ef7b04-d7fc-4325-919a-79352c7394c8

                        try out this one

                        <!--multicast channel="228.5.6.7" port="14021" timeout="1000" retry="3"/-->
                        <namingService name="Cos" host="" port="14021"/>

                        Host: IP address of the machine where reports server is started.
                        Port: Port number.

                         

                        start namingservice in a command prompt window:

                        Cd %oracle_home%\bin
                        Namingservice.bat port#

                        Here Port# = port number of the machine where reports server is started.
                        *Do not close the window, just minimize it.

                        Start an OC4J instance
                        All Programs -> MidTier Home -> Reports Developer -> Start OC4J Instance.

                        Start a new standalone reports :

                        Rwserver server= <your server> batch=yes

                        • 9. Re: Call 10g Report From Menu(.mmb)
                          27ef7b04-d7fc-4325-919a-79352c7394c8

                                       
                            Report_ID := FIND_REPORT_OBJECT('****');  -- **** means name off the report your calling
                            report_job_id := RUN_REPORT_OBJECT(Report_ID);
                            WEB.SHOW_DOCUMENT('/reports/rwservlet/showjobid'||substr(report_job_id,instr(report_job_id,'_',-1)+1)||'?'||'server='||substr( report_job_id ,1,instr( report_job_id ,'_',-1)-1),'_blank');