This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
FactuGES/Informes/InformeComisionesVendedores.pas
2007-06-26 08:08:27 +00:00

82 lines
2.0 KiB
ObjectPascal

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;
private
FFechaInicio : Variant;
FFechaFin : Variant;
protected
procedure RellenarCabecera(Band: TfrBand); override;
procedure PrepararConsultas; override;
public
procedure SetTablaComisionesVendedores (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;
end.