Ver Mensaje Individual
  #2  
Antiguo 13-12-2004
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Podrías usar el evento OnNeedData para alimentar al reporte con los datos provenientes del StringGrid.

En el siguiente ejemplo supongo que StringGrid es una rejilla sin columnas fijas, una fila fija y tres columnas:

Código Delphi [-]
procedure TForm2.QuickRep1NeedData(Sender: TObject; var MoreData: Boolean);
begin
  if ItemIndex < StringGrid.RowCount then
  begin
    QRLabel1.Caption := StringGrid.Cells[0, ItemIndex];
    QRLabel2.Caption := StringGrid.Cells[1, ItemIndex];
    QRLabel3.Caption := StringGrid.Cells[2, ItemIndex];
  end;

  Inc(ItemIndex);
  MoreData := ItemIndex <= StringGrid.RowCount;
end;

ItemIndex es una variable que debes inicializar a 1 (primera fila no fija) justo antes de mandar imprimir el reporte.

Las componentes QRLabel están en una banda detalle.

// Saludos
Responder Con Cita