Ver Mensaje Individual
  #2  
Antiguo 26-04-2010
toni.vi toni.vi is offline
Miembro
 
Registrado: may 2003
Ubicación: Sant Fost(Barcelona)
Posts: 102
Reputación: 24
toni.vi Va por buen camino
1.- Cambiando el AfterReportLoaded por BandaBeforePrint
2.- Preguntas por la banda que se va a imprimir.
3.- Buscas el componente.
4.- le asignas el valor que quieras

Utiliza algo así.
Código Delphi [-]
procedure TForm1.BandaBeforePrint(Sender: TQRCustomBand; var PrintBand: Boolean);
var                                                                                  
  vComponente : TComponent;     
  totalx : Double;
                                                       
begin                                                                                
  if UpperCase(sender.Name) = 'BANDADETALLE' then                                    
  begin                                                                              

     vComponente := Form1.ReportDesignerDialog1.ReportForm.FindComponent('muestracon');
     if (vComponente as TQRLabel) <> Nil then
     begin
       totalx := md.tfacturas.FieldByName('Total').AsFloat;

       (vComponente as TQRLabel).Caption := FloatToStr(totalx);
       (vComponente as TQRLabel).Enabled := True;
     end;

  end;
end;
Responder Con Cita