unit uEditorPedidosClienteReport; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uEditorPreview, JvAppStorage, JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, StdActns, ActnList, ComCtrls, TB2ExtItems, TBXExtItems, TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane, uIEditorPedidosClientePreview, JvExComCtrls, JvStatusBar, frxExportImage, frxExportPDF, frxDCtrl, frxClass, frxDMPExport, frxGradient, frxChBox, frxCross, frxRich, frxOLE, frxBarcode, frxExportText, frxExportRTF, frxExportMail, frxExportXLS; type TfEditorPedidosClientePreview = class(TfEditorPreview, IEditorPedidosClientePreview) TBXItem58: TTBXItem; procedure actExportarRTFExecute(Sender: TObject); private FVerPrecios : Boolean; FVerRefProveedor : Boolean; function GetVerPrecios: Boolean; function GetVerRefProveedor: Boolean; procedure SetVerPrecios(const Value: Boolean); procedure SetVerRefProveedor(const Value: Boolean); { Private declarations } public property VerPrecios : Boolean read GetVerPrecios write SetVerPrecios; property VerRefProveedor : Boolean read GetVerRefProveedor write SetVerRefProveedor; end; implementation {$R *.dfm} uses uPedidosClienteReportController, uDialogUtils; procedure TfEditorPedidosClientePreview.actExportarRTFExecute( Sender: TObject); var I: Integer; begin // inherited; <- No llamar al padre { if not Assigned(Controller) then raise Exception.Create('No se ha asignado el controlador necesario'); for I := 0 to ListaID.Count - 1 do if (Controller as IPedidosClienteReportController).ExportToWord(ListaID[I], '', FVerPrecios, FVerRefProveedor) then ShowInfoMessage('El pedido se ha exportado correctamente.'); } end; function TfEditorPedidosClientePreview.GetVerPrecios: Boolean; begin Result := FVerPrecios; end; function TfEditorPedidosClientePreview.GetVerRefProveedor: Boolean; begin Result := FVerRefProveedor; end; procedure TfEditorPedidosClientePreview.SetVerPrecios(const Value: Boolean); begin FVerPrecios := Value; end; procedure TfEditorPedidosClientePreview.SetVerRefProveedor( const Value: Boolean); begin FVerRefProveedor := Value; end; end.