2019-11-18 10:36:42 +00:00
|
|
|
|
unit uEditorContratosClienteReport;
|
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
|
ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorContratosClientePreview,
|
|
|
|
|
|
JvExComCtrls, JvStatusBar, frxDMPExport, frxGradient, frxChBox, frxCross,
|
|
|
|
|
|
frxRich, frxOLE, frxBarcode, JvAppStorage, JvAppRegistryStorage,
|
|
|
|
|
|
JvComponentBase, uEditorPreview, frxExportImage, frxExportPDF, frxDCtrl,
|
|
|
|
|
|
frxClass, JvFormPlacement, ImgList, PngImageList, StdActns, ActnList,
|
|
|
|
|
|
ComCtrls, TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar,
|
2024-05-20 16:09:11 +00:00
|
|
|
|
pngimage, frxExportText, frxExportRTF, frxExportMail, frxExportXLS,
|
|
|
|
|
|
frxExportCSV, uContratosClienteReportController;
|
2019-11-18 10:36:42 +00:00
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
|
TfEditorContratosClientePreview = class(TfEditorPreview, IEditorContratosClientePreview)
|
|
|
|
|
|
TBXItem58: TTBXItem;
|
2024-05-20 16:09:11 +00:00
|
|
|
|
actAumentarTamLetra: TAction;
|
|
|
|
|
|
actDisminuirTamLetra: TAction;
|
|
|
|
|
|
TBXItem59: TTBXItem;
|
|
|
|
|
|
TBXItem60: TTBXItem;
|
|
|
|
|
|
TBXSeparatorItem21: TTBXSeparatorItem;
|
|
|
|
|
|
procedure actAumentarTamLetraExecute(Sender: TObject);
|
|
|
|
|
|
procedure actDisminuirTamLetraExecute(Sender: TObject);
|
|
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
FVerCondiciones: boolean;
|
|
|
|
|
|
FTamLetra: Integer;
|
|
|
|
|
|
|
|
|
|
|
|
function getTamLetra: Integer;
|
|
|
|
|
|
function getVerCondiciones: Boolean;
|
|
|
|
|
|
procedure setTamLetra(const Value: Integer);
|
|
|
|
|
|
procedure setVerCodiciones(const Value: Boolean);
|
|
|
|
|
|
|
|
|
|
|
|
procedure refrescarInforme;
|
|
|
|
|
|
|
|
|
|
|
|
public
|
|
|
|
|
|
property Vercondiciones: Boolean read getVerCondiciones write setVerCodiciones;
|
|
|
|
|
|
property TamLetra: Integer read getTamLetra write setTamLetra;
|
|
|
|
|
|
|
2019-11-18 10:36:42 +00:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
2024-05-20 16:09:11 +00:00
|
|
|
|
cxControls, uROTypes, uFactuGES_App, uIntegerListUtils, uDialogUtils, uBizContratosCliente;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfEditorContratosClientePreview.actAumentarTamLetraExecute(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
inherited;
|
|
|
|
|
|
//Si sale de los l<>mites de tama<6D>o de letra no hacemos nada
|
|
|
|
|
|
if (FTamLetra >= CTE_TamLetraMax) then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
|
|
|
|
|
|
TamLetra := TamLetra + CTE_Aumento;
|
|
|
|
|
|
refrescarInforme;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfEditorContratosClientePreview.actDisminuirTamLetraExecute(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
inherited;
|
|
|
|
|
|
//Si sale de los l<>mites de tama<6D>o de letra no hacemos nada
|
|
|
|
|
|
if (TamLetra <= CTE_TamLetraMin) then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
|
|
|
|
|
|
TamLetra := TamLetra - CTE_Aumento;
|
|
|
|
|
|
refrescarInforme;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function TfEditorContratosClientePreview.getTamLetra: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Result := FTamLetra;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TfEditorContratosClientePreview.getVerCondiciones: Boolean;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Result:= FVerCondiciones;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfEditorContratosClientePreview.refrescarInforme;
|
|
|
|
|
|
var
|
|
|
|
|
|
AStream: Binary;
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
|
ShowHourglassCursor;
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
|
|
|
|
AStream := (Controller as IContratosClienteReportController).DataModule.GetRptContratos(Self.ListaID, FVerCondiciones, FTamLetra);
|
|
|
|
|
|
LoadFromStream(AStream);
|
|
|
|
|
|
Report.ShowPreparedReport;
|
|
|
|
|
|
|
|
|
|
|
|
finally
|
|
|
|
|
|
FreeAndNil(AStream);
|
|
|
|
|
|
HideHourglassCursor;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfEditorContratosClientePreview.setTamLetra(const Value: Integer);
|
|
|
|
|
|
begin
|
|
|
|
|
|
FTamLetra := Value;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfEditorContratosClientePreview.setVerCodiciones(const Value: Boolean);
|
|
|
|
|
|
begin
|
|
|
|
|
|
FVerCondiciones := Value;
|
|
|
|
|
|
end;
|
2019-11-18 10:36:42 +00:00
|
|
|
|
|
|
|
|
|
|
end.
|