10 Replies Latest reply: Sep 21, 2013 1:21 AM by IK RSS

    how to relove this problem in forms 10g(10.1.2.0.2)

    Manoj Rajput
      m trying to use run_report_object so many time but error is coming out like "Cannot find report :invalid ID" please help me
      what should i do


      Rgds
      Manoj
        • 1. Re: how to relove this problem in forms 10g(10.1.2.0.2)
          Christian Erlinger
          what should i do
          Post all the steps you did, and maybe a little sample of your code (please don't post the whole bunch of code) with
           tags. Maybe also the instructions you used on how to run a report. 
          
          calling +run_report_object+ is just 1% of the work to do to call a report, if this is the only thing you did then you most certainly will have to do the other 99%. But from the informations you gave us this is hard to tell.
          
          cheers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
          • 2. Re: how to relove this problem in forms 10g(10.1.2.0.2)
            Manoj Rajput
            Hi cheers,

            i m using the function "FIND_REPORT_OPBJECT('TEST.RDF') or "FIND_REPORT_OPBJECT('C:\TEST.RDF') like this in our code
            so i m getting this error

            rgds
            Manoj
            • 3. Re: how to relove this problem in forms 10g(10.1.2.0.2)
              Christian Erlinger
              I very much doubt that you have a reports object called test.rdf in your form. This sounds like a report, not the reports object. Those are two different things.

              Have a look here:
              http://www.oracle.com/technetwork/developer-tools/forms/documentation/integrating-forms11g-and-reports11g-1905204.pdf

              the guide is for forms/reports 11g, but it shouldn't be much different to 10g.

              cheers
              • 4. Re: how to relove this problem in forms 10g(10.1.2.0.2)
                Manoj Rajput
                Dear cheers

                I am using the following code on the button in forms

                declare
                repid REPORT_OBJECT;
                v_rep VARCHAR2(100);
                rep_status VARCHAR2(20);
                BEGIN
                repid := find_report_object('test');
                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'); -- PDF, HTMLCSS ...
                SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'manoj');
                SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:department);
                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 WEB.SHOW_DOCUMENT('http://<YourServerName:your_port/reports/rwservlet/getjobid'||
                substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=reportserver10g','_blank');

                /*the above code will help you to create in browser*/
                ELSE
                message('Error in report');
                END IF;
                END;


                earlier i was using show.web_document
                with oracle forms 10g (10.1.2.0.2) with out AS(file server), but when run the report on client machine report path shown like this "
                http://abc:8889/reports/rwservlet?report=D:\test.rdf&server=manoj&DESTYPE=CACHE&DESFORMAT=PDF&mode=DEFAULT&PARAMFORM=no&p_empno=&USERID=scott/tiger@orcl"

                I want to hide connection sting (USERID=scott/tiger@orcl)
                • 5. Re: how to relove this problem in forms 10g(10.1.2.0.2)
                  Michael Ferrante-Oracle
                  Go back and re-read the doc references:

                  http://www.oracle.com/technetwork/developer-tools/forms/documentation/integrating-forms11g-and-reports11g-1905204.pdf

                  Specifically look at page 3 which explains that you need to create a Report object in your form. Then notice that in the code examples, that " find_report_object" is looking for the name of the object you created in the form and not your report file name.
                  • 6. Re: how to relove this problem in forms 10g(10.1.2.0.2)
                    Manoj Rajput

                    dear

                     

                    I am facing problem to send multiple parameter from oracle form to report

                    for exam


                    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:department);


                    but i want to add 5 another parameter also, so please help

                    like this

                    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pempno='||:empno);

                    • 7. Re: how to relove this problem in forms 10g(10.1.2.0.2)
                      Priyasagi

                      Hi Manoj,

                       

                      Use run_product() built-in function, this satisfy  your requirement.

                       

                      For example:

                       

                      declare

                           pl_id paramlist;

                      begin

                           pl_id:=get_parameter_list(‘test_param’);

                       

                                if  id_null(pl_id) then

                                     pl_id:=create_parameter_list(‘test_param’);

                                     Add_Parameter(pl_id,'fr_month', TEXT_PARAMETER, to_char(:from_date,'dd/mm/yyyy')) ;

                                     Add_Parameter(pl_id,'to_month', TEXT_PARAMETER, to_char(:to_date,'dd/mm/yyyy')) ;

                                     Add_Parameter(pl_id,'p_cls_id', TEXT_PARAMETER,:cls_id);

                                     Add_Parameter(pl_id,'p_school_id', TEXT_PARAMETER, :sch_id) ;

                                     Add_Parameter(pl_id,'p_year_id', TEXT_PARAMETER, :yr_id) ;

                                     Add_Parameter(pl_id,'fees_id', TEXT_PARAMETER, :fees_id) ;

                                end if;

                              

                      run_product(reports,report_name, synchronous, runtime, filesystem, pl_id, Null) ;

                       

                      destroy_parameter_list(pl_id);

                       

                      Message was edited by: Priyasagi

                      • 8. Re: how to relove this problem in forms 10g(10.1.2.0.2)
                        Andreas Weiden

                        Unfortunately, RUN_PRODUCT doesn't work in Forms 10G.

                         

                        But..., what exactly is the problem in appending more parameters to that string?

                        • 9. Re: how to relove this problem in forms 10g(10.1.2.0.2)
                          Priyasagi

                          Sorry Andreas.  I was not concentrate on that.

                          • 10. Re: how to relove this problem in forms 10g(10.1.2.0.2)
                            IK

                            Hi,

                            append and concate. as many parameters as you have created in your report .i.e


                            SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:department||' padd='||:add||' pphone='||:phone);