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
  #4  
Antiguo 04-10-2006
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Poder: 22
Héctor Randolph Va por buen camino
Hola charlie663!

Busca en las demos que vienen con Delphi para QuickReport, existe una que puede servirte en donde se hace uso del evento OnNeedData:

Código Delphi [-]
procedure TfrmNeedData.FormCreate(Sender: TObject);
var
  i: integer;
begin
  SomeList := TStringlist.Create;

  for i := 0 to 500 do
    SomeList.Add('Line ' + IntToStr(i));
end;

procedure TfrmNeedData.QuickRep1BeforePrint(Sender: TCustomQuickRep;
  var PrintReport: Boolean);
begin
  // You must reset your data in the BeforePrint event
  // or when you print from the preview, the report will
  // start with the last value(s)
  CurrentIndex := 0;
end;

procedure TfrmNeedData.QuickRep1NeedData(Sender: TObject;
  var MoreData: Boolean);
begin
  // If MoreData is true, then QuickReport will print
  // another detail band.  When you set it to false,
  // the report is done.  

  MoreData := (CurrentIndex < SomeList.Count);

  if MoreData then
  begin
    QRLabel1.Caption := SomeList[CurrentIndex];

    // Here's how to set the progress bar
    QuickRep1.QRPrinter.Progress := (Longint(CurrentIndex) * 100) div SomeList.Count;
  end
  else
    QuickRep1.QRPrinter.Progress := 100;

  Inc(CurrentIndex);
end;

Saludos
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
Necesito componente para imprimir codigo de barras en un QReport evert Impresión 2 19-12-2006 17:31:09
listbox DM2005 Varios 1 15-09-2006 03:14:53
Componente de dos ListBox con items intercambiables Tomás OOP 6 07-05-2004 18:42:39
Apuntar una propiedad de un componente a otra de otro componente Majo Varios 10 24-03-2004 19:46:39
Como instalar el componente QReport Sonia Impresión 2 10-01-2004 15:18:24


La franja horaria es GMT +2. Ahora son las 19:50:47.


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