unit InformeComisionesVendedores; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, InformeBase, FR_IBXDB, FR_Shape, FR_DSet, FR_DBSet, FR_Class, DB, IBCustomDataSet, IBQuery, RxMemDS, RdxEmpresaActiva; type TdmInformeComisionesVendedores = class(TdmInformeBase) TablaVen: TfrDBDataSet; TablaComisionesVendedores: TRxMemoryData; TablaFac: TfrDBDataSet; TablaFacturas: TRxMemoryData; private FFechaInicio : Variant; FFechaFin : Variant; protected procedure RellenarCabecera(Band: TfrBand); override; procedure PrepararConsultas; override; public procedure SetTablaComisionesVendedores (Value : TRxMemoryData); procedure SetTablaFacturas (Value : TRxMemoryData); constructor Create(AOwner: TComponent); override; published property FechaInicio : variant read FFechaInicio write FFechaInicio; property FechaFin : variant read FFechaFin write FFechaFin; end; var dmInformeComisionesVendedores: TdmInformeComisionesVendedores; implementation {$R *.dfm} uses StrFunc; { TdmInformeBase1 } constructor TdmInformeComisionesVendedores.Create(AOwner: TComponent); begin inherited; FNombreInforme := 'InformeComisionesVendedores.frf'; end; procedure TdmInformeComisionesVendedores.PrepararConsultas; begin // end; procedure TdmInformeComisionesVendedores.SetTablaComisionesVendedores(Value: TRxMemoryData); begin TablaComisionesVendedores.LoadFromDataSet(Value, -1, lmCopy); end; procedure TdmInformeComisionesVendedores.RellenarCabecera(Band: TfrBand); var iCont : Integer; Objeto : TfrView; begin inherited; with Band do begin for iCont := 0 to Objects.Count - 1 do begin Objeto := Objects[iCont]; if ((Objeto is TfrMemoView) and (Objeto.Name = 'CabParametros')) then begin with (Objeto as TfrMemoView) do begin Memo.Clear; Memo.Add('Empresa: ' + EmpresaActiva.NombreComercial); Memo.Add('Rango de fechas: ' + FechaInicio + ' - ' + FechaFin); end; end; end; end; end; procedure TdmInformeComisionesVendedores.SetTablaFacturas( Value: TRxMemoryData); begin TablaFacturas.LoadFromDataSet(Value, -1, lmCopy); end; end.