Ver Mensaje Individual
  #3  
Antiguo 07-05-2004
Avatar de jachguate
jachguate jachguate is offline
Miembro
 
Registrado: may 2003
Ubicación: Guatemala
Posts: 6.254
Reputación: 28
jachguate Va por buen camino
Hola.

No he entendido exactamente cual es tu problema, pero si simplemente tenes que ejecutar código distinto si se trata de un CompositeReport o no, podrias hacer algo como:

Código Delphi [-]
procedure TFPreview.tbImprimirClick(Sender: TObject);
begin
  if QRPrinter.Master <> nil then begin
    if qrPrinter.Master is TqrCompositeRep Then
    Begin
      with (qrPrinter.Master as TqrCompositeRep) do
      Begin
        PrinterSetup;
        if tag = 0 Then
          Print;
      End;
    End
    Else Begin
      with TCustomQuickRep(QRPrinter.Master) do begin
        PrinterSetup;
        if Tag = 0 then
          Print;
      end;
    End;
  end;
end;

Hasta luego.

__________________
Juan Antonio Castillo Hernández (jachguate)
Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate
Responder Con Cita