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
  #2  
Antiguo 02-09-2003
Viet Viet is offline
Miembro
 
Registrado: jul 2003
Ubicación: Argentina - Mar del Plata
Posts: 252
Poder: 23
Viet Va por buen camino
la solucion seria algo asi:

with pdf do
begin
FileName := nomArch;

// starting printing document.
BeginDoc;

sp.ParamByName('@id_cuenta').AsInteger := idCuenta;
sp.ParamByName('@desde').AsDate := desde;
sp.ParamByName('@hasta').AsDate := hasta;
sp.Open;

cantpag := sp.RecordCount div PRGridPanel1.RowCount;
if (sp.RecordCount mod PRGridPanel1.RowCount)>0 then
inc(cantpag);

pag := 1;
while not sp.Eof do
Print(PRPage1);

// save document.
EndDoc;
sp.Close;
end;
finally
Screen.Cursor := crDefault;
end;

procedure TfmStatement.PRGridPanel1AfterPrint(Sender: TObject;
ACanvas: TPRCanvas; Rect: TRect);
begin
inc(pag);
end;

procedure TfmStatement.PRLayoutPanel1BeforePrint(Sender: TObject;
ACanvas: TPRCanvas; Rect: TRect);
begin
laPag.Caption := 'Page '+IntToStr(pag)+' of '+IntToStr(cantpag);
end;
__________________
Marín Ignacio Borthiry (Viet) - "El hombre arriesga su vida cada vez que elije y eso es lo que lo hace libre" ;)
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


La franja horaria es GMT +2. Ahora son las 04:06:13.


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