Ver Mensaje Individual
  #2  
Antiguo 04-10-2008
Avatar de Softweb
Softweb Softweb is offline
Miembro
 
Registrado: ago 2008
Posts: 46
Reputación: 0
Softweb Va por buen camino
Hola:

Con Rave no se pues no lo e usado nunca pero QReport yo lo utilizo de esta forma

Código Delphi [-]
procedure TDlgEdiFacturas.imprimir(Sender: TObject);
var
  oldPrinter : TPrinter;
begin
  if TablaF.State in [ dsInsert, dsEdit ] then TablaF.Post;
  Screen.Cursor := crHourglass;
  repFacturaDes := TrepFacturaDes.Create( Self );
  try
    // Guardamos la impresora actual 
    oldprinter := SetPrinter( TPrinter(repFacturaDes.Printer) );
    repFacturaDes.Prepare;
    // Comprobamos que la impresora configurada exise
    if repFacturaDes.Printer.Printers.IndexOf( V_PRINT_CONFIGURADA ) = -1 then
       begin
       ShowMessage( V_PRINT_CONFIGURADA );
       MessageDlg( 'No encuentro la impresora estandar configurada', mtError, [mbOk], 0 );
       SetPrinter( oldPrinter );
       exit;
       end;
    // Se la a asigno al reporte
    repFacturaDes.PrinterSettings.PrinterIndex := repFacturaDes.Printer.Printers.IndexOf( V_PRINT_CONFIGURADA );

    repFacturaDes.Print;
    
  finally
    repFacturaDes.Free;
    // Reponemos la impresora por defecto
    SetPrinter( oldPrinter );
  end;

end;

Espero que te sirva.

Saludos
Responder Con Cita