Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Go Back   Foros Club Delphi > Principal > Impresión
Register FAQ Members List Calendar Guía de estilo Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04/10/2006
Héctor Randolph's Avatar
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Join Date: Dec 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
Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Necesito componente para imprimir codigo de barras en un QReport evert Impresión 2 19/12/2006 17:31
listbox DM2005 Varios 1 15/09/2006 03:14
Componente de dos ListBox con items intercambiables Tomás OOP 6 07/05/2004 18:42
Apuntar una propiedad de un componente a otra de otro componente Majo Varios 10 24/03/2004 19:46
Como instalar el componente QReport Sonia Impresión 2 10/01/2004 15:18


All times are GMT +2. The time now is 21:37.


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