4 Replies Latest reply: May 7, 2013 9:30 AM by Michael Ferrante-Oracle RSS

    wut 118 application server file abc.prn does not exist or is of zero length

    user2040934
      dear members,

      I am printing a character mode report which gives the following error:

      "wut 118 application server file c:\abc.prn does not exist or is of zero length"

      my code on when-button-pressed is here:
                declare
                     repid REPORT_OBJECT;
                     v_rep VARCHAR2(200);
                     rep_status VARCHAR2(50);
                     report_name varchar2(100);
                     v_path varchar2(200);
                     rep_server varchar2(50);
                BEGIN
                     select parameter into rep_server from mis where parameter_type = 'REPORT_SERVER';
                     report_name := 'C:\TEMP\abc.prn';
                     repid := find_report_object('reports');
                     SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,:global.report_path||'abc123.rdf');
                     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,FILE);
                     SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,:global.report_path||'dflt.prt');
                     SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,report_name);
                     SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,REP_SERVER);
      PF_FGOWGPNO='||:FG_DISPATCH_M.FGOWGPNO||' PF_FISCAL_YEAR='||:FG_DISPATCH_M.XFISCAL_YEAR||:FG_DISPATCH_M.XFISCAL_YEAR||' P_USERNAME='||:DUMMY.USER);
      PF_FGOWGPNO='||:FG_DISPATCH_M.FGOWGPNO||' PF_FISCAL_YEAR='||:FG_DISPATCH_M.XFISCAL_YEAR);
                     SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no PF_FGOWGPNO='||:FG_WH_INTERCHANGE.FG_TRANSIT_ID||' PF_FISCAL_YEAR='||:FG_WH_INTERCHANGE.XFISCAL_YEAR||' PRINT_IT='||:DUMMY.PRINT_IT);
                     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('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repsrv10g','_blank');
      
      
                          NULL;
                     ELSE
                          message('Error when running report');
                     END IF;
                     exception
                          when others then
                          message(sqlerrm);
                          raise form_trigger_failure;
                     END;
                      declare
                           a boolean;
                      begin
                           a := webutil_file_transfer.as_to_client('c:\temp\abc.prn','c:\temp\abc.prn');
                      end;               
                      begin
                           client_host('cmd start /c type c:\temp\abc.prn > prn');
                      exception
                           when others then null;
                      end;
      Regards: