Home » Developer & Programmer » Forms » How solve error WUF-201 (Oracle Forms 10g with Windows 98)
How solve error WUF-201 [message #300966] Mon, 18 February 2008 18:59 Go to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Received via PM from mbpenaloza:
-----------------------------------------------------------------
Good morning

I live in South America (Ecuador) and my english is not very good. Sorry by my mistakes in words of this message.

My situation is this.

I use Oracle Forms 10g and try print direct to printer using client_text_io.fopen('PRN', 'w') in clint machine with Windows 98 and occurs next error:

WUF-201: Cannot open file PRN for write in mode ('w'). Exception java.io.filenotfoundException:PRN. Path not found.

Maybe the operative system is not compatible with WebUtil because in others clients machine with Windows Xp not have troubles.

The code is this:
PROCEDURE P_IMPRIME_RETENCION (
  Pn_Numero          in   Number,
  Pv_Serie           in   Varchar2,
  Pn_CodigoEmpresa   in   Number) IS
  Ln_Total            Number;
  i                   Number;
  Ln_total_lineas     Number;
  Ln_lineas_detalle   Number;
  Ln_Contador         Number;
  Lv_Ruc              Varchar2 (13);
  Lv_Cpbte            Varchar2 (21);
  Lv_Fecha            Varchar2 (40);
  Lv_factura1         Varchar2 (50);
  Lv_Nombre           Varchar2 (100);
  Lv_Direccion        Varchar2 (100);
  Lv_facturas         Varchar2 (200);
  Lv_Error            Varchar2 (200);
  out_file            Client_Text_IO.File_Type;
BEGIN
  Lv_factura1 := null;
  Lv_facturas := null;
  Ln_total_lineas := 4;
  Ln_lineas_detalle := 0;
  out_file := Client_Text_IO.Fopen ('LPT1', 'w');
  select to_char (a.fecha, 'dd-mm-yyyy'), a.cedula_ruc, b.representante,
         b.direccion
    into Lv_Fecha, Lv_Ruc, Lv_nombre,
         Lv_Direccion
    from in_retencion a, in_proveedores b
   where numero = Pn_numero
     and a.serie = Pv_serie
     and secuencia = :bl_retenciones.secuencia
     and a.codigo_sucursal = :bl_retenciones.codigo_sucursal
     and a.codigo_empresa = :global.codigo_empresa
     and b.cedula_ruc = a.cedula_ruc;
  select sum (valor)
    into Ln_Total
    from in_retencion_detalle
   where numero = Pn_numero
     and serie = Pv_serie
     and secuencia = :bl_retenciones.secuencia
     and codigo_sucursal = :bl_retenciones.codigo_sucursal
     and codigo_empresa = Pn_codigoempresa;
  Ln_Contador := 0;
  for f in (select   tipo_comprobante, numero_comprobante
                from in_retencion_detalle
               where numero = Pn_numero
                 and serie = Pv_serie
                 and secuencia = :bl_retenciones.secuencia
                 and codigo_sucursal = :bl_retenciones.codigo_sucursal
                 and codigo_empresa = Pn_codigoempresa
            group by tipo_comprobante, numero_comprobante)
  loop
    Ln_Contador := Ln_Contador + 1;
    if Ln_Contador <= 1 then
      if f.tipo_comprobante = '1' then
        Lv_Cpbte := 'FACTURA';
      elsif f.tipo_comprobante = '2' then
        Lv_Cpbte := 'NOTA DE VENTA';
      else
        Lv_Cpbte := 'LIQUIDACION DE COMPRA';
      end if;
    end if;
    if Lv_factura1 is null then
      Lv_factura1 := to_char (Lv_factura1
                              || f.tipo_comprobante
                              || '-'
                              || f.numero_comprobante
                              || ',');
    else
      Lv_facturas := to_char (Lv_facturas
                              || f.tipo_comprobante
                              || '-'
                              || f.numero_comprobante);
    end if;
  end loop;
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.Put (out_file,
                      ' ' || RPAD (upper (Lv_nombre), 45, ' ') || ' '
                      || Lv_fecha);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.Put (out_file,
                      ' '
                      || RPAD (upper (Lv_ruc), 13, ' ')
                      || ' '
                      || rpad (Lv_Cpbte, 33, ' '));
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.Put (out_file,
                      ' '
                      || RPAD (upper (Lv_direccion), 40, ' ')
                      || ' '
                      || RPAD (upper (Lv_factura1), 19, ' '));
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.Put (out_file, ' ' || :bl_retenciones.concepto);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  Client_Text_IO.New_Line (out_file);
  for c in (select   a.porcentaje, a.tipo_retencion, a.codigo_retencion,
                     b.descripcion, sum (base_imponible) base, sum (valor)
                                                                          valor
                from in_retencion_detalle a, pg_tipo_retencion b
               where a.numero = Pn_numero
                 and a.serie = Pv_serie
                 and secuencia = :bl_retenciones.secuencia
                 and a.codigo_sucursal = :bl_retenciones.codigo_sucursal
                 and b.tipo_retencion = a.tipo_retencion
                 and a.codigo_empresa = Pn_codigoempresa
            group by a.tipo_retencion,
                     a.codigo_retencion,
                     a.porcentaje,
                     b.descripcion)
  loop
    Ln_lineas_detalle := Ln_lineas_detalle + 1;
    Client_Text_IO.Put (out_file,
                        ' '
                        || :bl_retenciones.ano_fiscal
                        || ' '
                        || RPAD (upper (c.descripcion), 17, ' ')
                        || ' '
                        || to_char (c.base, '9,999,990.00')
                        || ' '
                        || c.codigo_retencion
                        || ''
                        || to_char (c.porcentaje, '9,999,990.00')
                        || '% '
                        || to_char (c.valor, '9,999,990.00'));
    Client_Text_IO.New_Line (out_file);
  end loop;
  for i in Ln_lineas_detalle .. Ln_total_lineas
  loop
    Client_Text_IO.New_Line (out_file);
  end loop;
  Client_Text_IO.Put (out_file,
                      ' TOTAL: ' || to_char (Ln_total, '9,999,990.00'));
  Client_Text_IO.Fclose (out_file);
  VARGEN.Gn_Boton :=
    F_MOSTRAR_ALERTA
                    ('Atención, se imprimio la retención satisfactoriamente ..',
                     'NOTE');
EXCEPTION
  WHEN OTHERS THEN
    VARGEN.Gn_Boton := F_MOSTRAR_ALERTA ('Error ' || sqlerrm);
    raise form_trigger_failure;
END;

Tanks so much for your help

[Updated on: Mon, 18 February 2008 18:59]

Report message to a moderator

Re: How solve error WUF-201 [message #300967 is a reply to message #300966] Mon, 18 February 2008 19:01 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Marcelo,

Please don't PM questions. Post your problem and let everyone try to help you.

Have you solved your problem?

David
Previous Topic: Issue in formweb.cfg using Sun JVM
Next Topic: How to change the background color of a item at runtime
Goto Forum:
  


Current Time: Fri Apr 28 03:31:02 CDT 2017

Total time taken to generate the page: 0.21430 seconds