unit ListadoBase; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, RdxTitulos, RdxPaneles, RdxFrame, VistaPrevia, InformeBase, Tipos; type TfrListadoBase = class(TRdxFrame) Titulo: TRdxPanelTituloOperacion; pnlDatos: TRdxPanel; cDatos: TRdxCabecera; eInformacion: TLabel; pnlVistaPrevia: TPanel; protected FVistaPrevia : TfrVistaPrevia; FInforme : TdmInformeBase; procedure RefrescarInforme; virtual; function CloseFrame : Boolean; override; public constructor Create(AOwner : TComponent); override; destructor Destroy; override; end; var frListadoBase: TfrListadoBase; implementation {$R *.DFM} function TfrListadoBase.CloseFrame: Boolean; begin if Assigned(FInforme) then FInforme.Preview := NIL; (FVistaPrevia as TRdxFrame).CloseFrame; Result := inherited CloseFrame; end; constructor TfrListadoBase.Create(AOwner: TComponent); begin inherited Create(AOwner); FInforme := NIL; FVistaPrevia := TfrVistaPrevia.Create(Self); FVistaPrevia.Parent := pnlVistaPrevia; end; destructor TfrListadoBase.Destroy; begin if Assigned(FInforme) then FreeAndNil(FInforme); inherited; end; procedure TfrListadoBase.RefrescarInforme; begin FInforme.Previsualizar; end; end.