Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 28-03-2011
Diana Carolina Diana Carolina is offline
Miembro
NULL
 
Registrado: nov 2010
Posts: 30
Poder: 0
Diana Carolina Va por buen camino
imprimir y vista preliminar

ok...bueno anteriormente el reporte funcionaba correctamente...es decir el boton imprimir del formulario y el imprimir que esta en la vista preliminar mostraban el reporte completo, me toco meterle la validacion de qrynuevo por un cambio en el nombre de un campo en una tabla, despues de ese cambio me sucedio el problema con el imprimir de la vista preliminar...los eventos afterprint y beforeprint estan programados.

Código Delphi [-]
procedure TFrmRepFormulario.spbPreliminarClick(Sender: TObject);
begin
  inherited;
  if Qrytipopersona.AsString = 'A' then
    begin
     VarTipoIdCl := Qrytipopersonatipo.AsString;
     ppReportepers1.DeviceType := dtScreen;
     ppReportepers1.Print;
    end
  else
    begin
     VarTipoIdCl := Qrytipopersonatipo.AsString;
     ppReportepers2.DeviceType := dtScreen;
     ppReportepers2.Print;
    end;
  Qrynuevo.Close;
  if FrmPrincipal.QryperteneceFirma.AsString = '001' then
     begin
          Qrynuevo.SQL.Strings[2]:='A.ALGO,';
          Qrynuevo.SQL.Strings[11]:='AND OP.ALGO = A.ALGO';
     end
   else
      begin
          Qrynuevo.SQL.Strings[2]:='A.OTRO,';
          Qrynuevo.SQL.Strings[11]:='AND OP.OTRO = A.ALGO'
      end;

  Qrynuevo.open;
end;

procedure TFrmRepFormulario.spbImprimirClick(Sender: TObject);
var
  i : Integer;
  Pers1,Pers2 : Boolean;
begin
  inherited;
  Pers1 := False;
  Pers2 := False;
  for i := 0 to Qrypersona.RecordCount -1 do
  begin
    if Qrytipopersona.AsString = 'A' then
      begin
       VarTipoIdCl := Qrytipopersonatipo.AsString;
       ppReportepers1.DeviceType := dtPrinter;
       if Pers1 then
         begin
           ppReportepers1.ShowPrintDialog := False;
           ppReportepers1.ShowCancelDialog := False;
         end;
       ppReportepers1.Print;
       Pers1 := True;
      end
    else
      begin
       VarTipoIdCl := Qrytipopersonatipo.AsString;
       ppReportepers2.DeviceType := dtPrinter;
       if PersNat then
         begin
           ppReportepers2.ShowPrintDialog := False;
           ppReportepers2.ShowCancelDialog := False;
         end;
       ppReportepers2.Print;
       Pers2 := True;
      end;
    Qrytipopersona.FindNext;
   end;
  Qrynuevo.Close;//***Aqui agregue
if FrmPrincipal.QryperteneceFirma.AsString = '001' then
     begin
          Qrynuevo.SQL.Strings[2]:='A.ALGO,';
          Qrynuevo.SQL.Strings[11]:='AND OP.ALGO = A.ALGO'
     end
   else
      begin
          Qrynuevo.SQL.Strings[2]:='A.OTRO,';
          Qrynuevo.SQL.Strings[11]:='AND OP.OTRO = A.ALGO'
      end;

  Qrynuevo.open;  
end;

Cuando le doy click en vista preliminar muestra el fromulario con toda la informacion(Completo),,,pero al darle click en el boton de imprimir que sale en esa misma ventana, es decir la ventana con el reporte que saca el report builder...no imprime el formulario completo

Última edición por Casimiro Noteví fecha: 29-03-2011 a las 22:32:07. Razón: completar
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Imprimir report builder MIGUELITO Impresión 1 18-01-2011 22:47:10
Obtener PageCount de Reporte realizado en Report Builder. cybergerman Impresión 1 11-02-2010 23:50:24
Como ver un reporte de fast report desde un boton en delphi DATESCO Impresión 4 08-09-2008 05:42:31
Reporte diferentes con report builder vroa74 Impresión 0 17-09-2007 01:21:40
Problemas al imprimir dbmemos en report builder Jorge Taveras Impresión 9 05-10-2005 12:40:53


La franja horaria es GMT +2. Ahora son las 22:12:28.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi