Poder exportar a un ficheros Excel los grids.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@518 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
41fc3856a9
commit
f8d67b6ac8
@ -35,7 +35,6 @@ function DarFicheroBMPTemporal : String;
|
|||||||
function DarFicheroTIFFTemporal : String;
|
function DarFicheroTIFFTemporal : String;
|
||||||
function DarFicheroHTMLTemporal : String;
|
function DarFicheroHTMLTemporal : String;
|
||||||
function DarFicheroExcelTemporal : String;
|
function DarFicheroExcelTemporal : String;
|
||||||
function DarFicheroWordExportar (var Fichero : String) : Boolean;
|
|
||||||
function DarVersionFichero (Executable : String) : String;
|
function DarVersionFichero (Executable : String) : String;
|
||||||
function DarFechaFichero (Executable : String) : String;
|
function DarFechaFichero (Executable : String) : String;
|
||||||
procedure CopiarFichero(const Origen, Destino: string);
|
procedure CopiarFichero(const Origen, Destino: string);
|
||||||
@ -43,6 +42,8 @@ procedure DoDelTree( TheDir : String);
|
|||||||
procedure Deltree(DirToKill : String; KillChoosenDir : Boolean);
|
procedure Deltree(DirToKill : String; KillChoosenDir : Boolean);
|
||||||
function GetSpecialFolderPath(folder : integer) : string;
|
function GetSpecialFolderPath(folder : integer) : string;
|
||||||
function PreguntarRuta(const ATitulo: String; const AComentario: String; var ARuta: String): Boolean;
|
function PreguntarRuta(const ATitulo: String; const AComentario: String; var ARuta: String): Boolean;
|
||||||
|
function PreguntarFicheroWordExportar (var Fichero : String) : Boolean;
|
||||||
|
function PreguntarFicheroExcelExportar (var Fichero : String) : Boolean;
|
||||||
function EscapeIllegalChars(AFileName: string): string;
|
function EscapeIllegalChars(AFileName: string): string;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -174,7 +175,7 @@ begin
|
|||||||
Result := Copy(Cadena, 0, (Length(Cadena)-3)) + 'jpg';
|
Result := Copy(Cadena, 0, (Length(Cadena)-3)) + 'jpg';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function DarFicheroWordExportar (var Fichero : String) : Boolean;
|
function PreguntarFicheroWordExportar (var Fichero : String) : Boolean;
|
||||||
var
|
var
|
||||||
DialogoSalvar : TSaveDialog;
|
DialogoSalvar : TSaveDialog;
|
||||||
begin
|
begin
|
||||||
@ -195,6 +196,28 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function PreguntarFicheroExcelExportar (var Fichero : String) : Boolean;
|
||||||
|
var
|
||||||
|
DialogoSalvar : TSaveDialog;
|
||||||
|
begin
|
||||||
|
DialogoSalvar := TSaveDialog.Create(NIL);
|
||||||
|
try
|
||||||
|
with DialogoSalvar do
|
||||||
|
begin
|
||||||
|
DefaultExt := 'xls';
|
||||||
|
Filter := 'Documento de Excel (*.xls)|*.xls';
|
||||||
|
FilterIndex := 0;
|
||||||
|
Options := [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing];
|
||||||
|
end;
|
||||||
|
Result := DialogoSalvar.Execute;
|
||||||
|
if Result then
|
||||||
|
Fichero := DialogoSalvar.FileName;
|
||||||
|
finally
|
||||||
|
DialogoSalvar.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function DarVersionFichero (Executable : String) : String;
|
function DarVersionFichero (Executable : String) : String;
|
||||||
var
|
var
|
||||||
Obj : TJclFileVersionInfo;
|
Obj : TJclFileVersionInfo;
|
||||||
|
|||||||
@ -58,52 +58,52 @@
|
|||||||
<DelphiCompile Include="GUIBase.dpk">
|
<DelphiCompile Include="GUIBase.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\Modulos\Articulos\Base.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\Base.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\cxLibraryD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\cxLibraryD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dbrtl.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dbrtl.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxBarD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxBarD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxBarExtItemsD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxBarExtItemsD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxComnD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxComnD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxGDIPlusD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxGDIPlusD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxLayoutControlD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxLayoutControlD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxPSCoreD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxPSCoreD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxPScxCommonD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxPScxCommonD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxPScxGrid6LnkD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxPScxGrid6LnkD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxPsPrVwAdvD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxPsPrVwAdvD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinBlackD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinBlackD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinBlueD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinBlueD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinCaramelD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinCaramelD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinCoffeeD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinCoffeeD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinGlassOceansD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinGlassOceansD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkiniMaginaryD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkiniMaginaryD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinLilianD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinLilianD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinLiquidSkyD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinLiquidSkyD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinLondonLiquidSkyD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinLondonLiquidSkyD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinMcSkinD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinMcSkinD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinMoneyTwinsD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinMoneyTwinsD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007BlackD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007BlackD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007BlueD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007BlueD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007GreenD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007GreenD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007PinkD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007PinkD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinOffice2007SilverD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinOffice2007SilverD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinsCoreD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinsCoreD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinscxPCPainterD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinscxPCPainterD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinsdxLCPainterD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinsdxLCPainterD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinSilverD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinSilverD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinStardustD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinStardustD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinValentineD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinValentineD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxSkinXmas2008BlueD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxSkinXmas2008BlueD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\dxThemeD11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\dxThemeD11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\frx11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\frx11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\frxe11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\frxe11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\fs11.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\fs11.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\JvAppFrmD11R.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvAppFrmD11R.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\JvCtrlsD11R.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\JvCtrlsD11R.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\rtl.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\rtl.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\vcl.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\vcl.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\vcldb.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\vcldb.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\vcljpg.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\vcljpg.dcp" />
|
||||||
<DCCReference Include="..\Modulos\Articulos\vclx.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\vclx.dcp" />
|
||||||
<DCCReference Include="uDialogBase.pas">
|
<DCCReference Include="uDialogBase.pas">
|
||||||
<Form>fDialogBase</Form>
|
<Form>fDialogBase</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
|||||||
@ -396,6 +396,7 @@ object fEditorBase: TfEditorBase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object SmallImages: TPngImageList
|
object SmallImages: TPngImageList
|
||||||
|
ShareImages = True
|
||||||
PngImages = <
|
PngImages = <
|
||||||
item
|
item
|
||||||
PngImage.Data = {
|
PngImage.Data = {
|
||||||
@ -885,6 +886,7 @@ object fEditorBase: TfEditorBase
|
|||||||
end
|
end
|
||||||
object LargeImages: TPngImageList
|
object LargeImages: TPngImageList
|
||||||
Height = 24
|
Height = 24
|
||||||
|
ShareImages = True
|
||||||
Width = 24
|
Width = 24
|
||||||
PngImages = <
|
PngImages = <
|
||||||
item
|
item
|
||||||
|
|||||||
@ -2,35 +2,35 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
Left = 441
|
Left = 441
|
||||||
Top = 354
|
Top = 354
|
||||||
Caption = 'fEditorGridBase'
|
Caption = 'fEditorGridBase'
|
||||||
ClientHeight = 444
|
ClientHeight = 504
|
||||||
ClientWidth = 543
|
ClientWidth = 706
|
||||||
OnDestroy = CustomEditorDestroy
|
OnDestroy = CustomEditorDestroy
|
||||||
ExplicitWidth = 551
|
ExplicitWidth = 714
|
||||||
ExplicitHeight = 478
|
ExplicitHeight = 538
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 543
|
Width = 706
|
||||||
ExplicitTop = 0
|
ExplicitTop = 0
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 706
|
||||||
inherited Image1: TImage
|
inherited Image1: TImage
|
||||||
Left = 516
|
Left = 679
|
||||||
ExplicitLeft = 518
|
ExplicitLeft = 518
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock: TTBXDock
|
inherited TBXDock: TTBXDock
|
||||||
Top = 27
|
Top = 27
|
||||||
Width = 543
|
Width = 706
|
||||||
Height = 75
|
Height = 75
|
||||||
ExplicitTop = 27
|
ExplicitTop = 27
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 706
|
||||||
ExplicitHeight = 75
|
ExplicitHeight = 75
|
||||||
inherited tbxMain: TTBXToolbar
|
inherited tbxMain: TTBXToolbar
|
||||||
DockPos = 0
|
DockPos = 0
|
||||||
DragHandleStyle = dhDouble
|
DragHandleStyle = dhDouble
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitWidth = 457
|
ExplicitWidth = 600
|
||||||
inherited TBXItem29: TTBXItem
|
inherited TBXItem29: TTBXItem
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
@ -49,10 +49,14 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
end
|
end
|
||||||
inherited TBXSeparatorItem10: TTBXSeparatorItem [12]
|
inherited TBXSeparatorItem10: TTBXSeparatorItem [12]
|
||||||
end
|
end
|
||||||
inherited TBXItem26: TTBXItem [13]
|
object TBXItem384: TTBXItem [13]
|
||||||
|
Action = actExportarExcel
|
||||||
|
DisplayMode = nbdmTextOnly
|
||||||
|
end
|
||||||
|
inherited TBXItem26: TTBXItem [14]
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
inherited TBXSeparatorItem2: TTBXSeparatorItem [14]
|
inherited TBXSeparatorItem2: TTBXSeparatorItem [15]
|
||||||
Visible = True
|
Visible = True
|
||||||
end
|
end
|
||||||
inherited TBXItem25: TTBXItem
|
inherited TBXItem25: TTBXItem
|
||||||
@ -61,7 +65,7 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
inherited TBXSeparatorItem11: TTBXSeparatorItem
|
inherited TBXSeparatorItem11: TTBXSeparatorItem
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object TBXItem36: TTBXItem [18]
|
object TBXItem36: TTBXItem [19]
|
||||||
Action = actAnchoAuto
|
Action = actAnchoAuto
|
||||||
DisplayMode = nbdmImageAndText
|
DisplayMode = nbdmImageAndText
|
||||||
end
|
end
|
||||||
@ -107,7 +111,7 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
inherited tbxMenu: TTBXToolbar
|
inherited tbxMenu: TTBXToolbar
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Visible = False
|
Visible = False
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 706
|
||||||
inherited TBXSubmenuItem4: TTBXSubmenuItem
|
inherited TBXSubmenuItem4: TTBXSubmenuItem
|
||||||
inherited TBXItem30: TTBXItem
|
inherited TBXItem30: TTBXItem
|
||||||
Visible = False
|
Visible = False
|
||||||
@ -123,6 +127,11 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
inherited TBXItem21: TTBXItem
|
inherited TBXItem21: TTBXItem
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
|
object TBXSeparatorItem172: TTBXSeparatorItem [12]
|
||||||
|
end
|
||||||
|
object TBXItem395: TTBXItem [13]
|
||||||
|
Action = actExportarExcel
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited TBXSubmenuItem5: TTBXSubmenuItem
|
inherited TBXSubmenuItem5: TTBXSubmenuItem
|
||||||
Visible = False
|
Visible = False
|
||||||
@ -163,10 +172,10 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited StatusBar: TJvStatusBar
|
inherited StatusBar: TJvStatusBar
|
||||||
Top = 425
|
Top = 485
|
||||||
Width = 543
|
Width = 706
|
||||||
ExplicitTop = 425
|
ExplicitTop = 485
|
||||||
ExplicitWidth = 543
|
ExplicitWidth = 706
|
||||||
end
|
end
|
||||||
inherited EditorActionList: TActionList
|
inherited EditorActionList: TActionList
|
||||||
Left = 64
|
Left = 64
|
||||||
@ -219,8 +228,15 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
OnExecute = actFiltrarExecute
|
OnExecute = actFiltrarExecute
|
||||||
OnUpdate = actFiltrarUpdate
|
OnUpdate = actFiltrarUpdate
|
||||||
end
|
end
|
||||||
|
object actExportarExcel: TAction
|
||||||
|
Category = 'Archivo'
|
||||||
|
Caption = 'Exportar a fichero Excel...'
|
||||||
|
OnExecute = actExportarExcelExecute
|
||||||
|
OnUpdate = actExportarExcelUpdate
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited SmallImages: TPngImageList
|
inherited SmallImages: TPngImageList
|
||||||
|
ShareImages = False
|
||||||
PngImages = <
|
PngImages = <
|
||||||
item
|
item
|
||||||
PngImage.Data = {
|
PngImage.Data = {
|
||||||
@ -1558,6 +1574,12 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
object N3: TMenuItem
|
object N3: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
|
object ExportaraficheroExcel1: TMenuItem
|
||||||
|
Action = actExportarExcel
|
||||||
|
end
|
||||||
|
object N488: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
object Actualizar1: TMenuItem
|
object Actualizar1: TMenuItem
|
||||||
Action = actRefrescar
|
Action = actRefrescar
|
||||||
end
|
end
|
||||||
|
|||||||
@ -57,6 +57,12 @@ type
|
|||||||
actFiltrar: TAction;
|
actFiltrar: TAction;
|
||||||
TBXItem37: TTBXItem;
|
TBXItem37: TTBXItem;
|
||||||
TBXTMain2: TTBXToolbar;
|
TBXTMain2: TTBXToolbar;
|
||||||
|
actExportarExcel: TAction;
|
||||||
|
ExportaraficheroExcel1: TMenuItem;
|
||||||
|
N488: TMenuItem;
|
||||||
|
TBXSeparatorItem172: TTBXSeparatorItem;
|
||||||
|
TBXItem395: TTBXItem;
|
||||||
|
TBXItem384: TTBXItem;
|
||||||
procedure tbxEditFiltroChange(Sender: TObject; const Text: String);
|
procedure tbxEditFiltroChange(Sender: TObject; const Text: String);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure actQuitarFiltroExecute(Sender: TObject);
|
procedure actQuitarFiltroExecute(Sender: TObject);
|
||||||
@ -69,6 +75,8 @@ type
|
|||||||
procedure actFiltrarExecute(Sender: TObject);
|
procedure actFiltrarExecute(Sender: TObject);
|
||||||
procedure actFiltrarUpdate(Sender: TObject);
|
procedure actFiltrarUpdate(Sender: TObject);
|
||||||
procedure CustomEditorDestroy(Sender: TObject);
|
procedure CustomEditorDestroy(Sender: TObject);
|
||||||
|
procedure actExportarExcelUpdate(Sender: TObject);
|
||||||
|
procedure actExportarExcelExecute(Sender: TObject);
|
||||||
protected
|
protected
|
||||||
FViewGrid : IViewGridBase;
|
FViewGrid : IViewGridBase;
|
||||||
procedure SetViewGrid(const Value : IViewGridBase); virtual;
|
procedure SetViewGrid(const Value : IViewGridBase); virtual;
|
||||||
@ -152,6 +160,7 @@ end;
|
|||||||
procedure TfEditorGridBase.FormShow(Sender: TObject);
|
procedure TfEditorGridBase.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
if Assigned(ViewGrid) then
|
if Assigned(ViewGrid) then
|
||||||
begin
|
begin
|
||||||
ViewGrid.ShowEmbedded(Self);
|
ViewGrid.ShowEmbedded(Self);
|
||||||
@ -171,6 +180,19 @@ begin
|
|||||||
(Sender as TAction).Enabled := False;
|
(Sender as TAction).Enabled := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorGridBase.actExportarExcelExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
if Assigned(ViewGrid) then
|
||||||
|
ViewGrid.ExportToExcel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfEditorGridBase.actExportarExcelUpdate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
(Sender as TAction).Enabled := Assigned(ViewGrid);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfEditorGridBase.actFiltrarExecute(Sender: TObject);
|
procedure TfEditorGridBase.actFiltrarExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|||||||
@ -17,7 +17,7 @@ uses
|
|||||||
cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
|
cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
|
||||||
cxGridTableView, cxGridDBTableView, cxGrid, Menus, ActnList, Grids,
|
cxGridTableView, cxGridDBTableView, cxGrid, Menus, ActnList, Grids,
|
||||||
DBGrids, JvComponent, JvFormAutoSize, uGridStatusUtils, uViewFiltroBase,
|
DBGrids, JvComponent, JvFormAutoSize, uGridStatusUtils, uViewFiltroBase,
|
||||||
uDAInterfaces;
|
uDAInterfaces, cxGridExportLink;
|
||||||
|
|
||||||
type
|
type
|
||||||
IViewGridBase = interface(IViewBase)
|
IViewGridBase = interface(IViewBase)
|
||||||
@ -38,6 +38,9 @@ type
|
|||||||
procedure GotoFirst;
|
procedure GotoFirst;
|
||||||
procedure GotoLast;
|
procedure GotoLast;
|
||||||
|
|
||||||
|
procedure ExportToExcel(const AFileName: string); overload;
|
||||||
|
procedure ExportToExcel; overload;
|
||||||
|
|
||||||
function GetFocusedView : TcxGridDBTableView;
|
function GetFocusedView : TcxGridDBTableView;
|
||||||
property _FocusedView : TcxGridDBTableView read GetFocusedView;
|
property _FocusedView : TcxGridDBTableView read GetFocusedView;
|
||||||
|
|
||||||
@ -154,6 +157,9 @@ type
|
|||||||
procedure GotoFirst;
|
procedure GotoFirst;
|
||||||
procedure GotoLast;
|
procedure GotoLast;
|
||||||
|
|
||||||
|
procedure ExportToExcel(const AFileName: string); overload;
|
||||||
|
procedure ExportToExcel; overload;
|
||||||
|
|
||||||
procedure StoreToRegistry (const Path : String); virtual;
|
procedure StoreToRegistry (const Path : String); virtual;
|
||||||
procedure RestoreFromRegistry (const Path : String); virtual;
|
procedure RestoreFromRegistry (const Path : String); virtual;
|
||||||
|
|
||||||
@ -256,25 +262,21 @@ end;
|
|||||||
procedure TfrViewGridBase.cxGridViewColumnGetStoredProperties(
|
procedure TfrViewGridBase.cxGridViewColumnGetStoredProperties(
|
||||||
Sender: TcxCustomGridTableItem; AProperties: TStrings);
|
Sender: TcxCustomGridTableItem; AProperties: TStrings);
|
||||||
begin
|
begin
|
||||||
// ShowMessage(Sender.Name + ' cxGridViewColumnGetStoredProperties');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewGridBase.cxGridViewColumnGetStoredPropertyValue(
|
procedure TfrViewGridBase.cxGridViewColumnGetStoredPropertyValue(
|
||||||
Sender: TcxCustomGridTableItem; const AName: string; var AValue: Variant);
|
Sender: TcxCustomGridTableItem; const AName: string; var AValue: Variant);
|
||||||
begin
|
begin
|
||||||
// ShowMessage(Sender.Name + ' cxGridViewColumnGetStoredPropertyValue');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewGridBase.cxGridViewColumnSetStoredPropertyValue(
|
procedure TfrViewGridBase.cxGridViewColumnSetStoredPropertyValue(
|
||||||
Sender: TcxCustomGridTableItem; const AName: string; const AValue: Variant);
|
Sender: TcxCustomGridTableItem; const AName: string; const AValue: Variant);
|
||||||
begin
|
begin
|
||||||
// ShowMessage(Sender.Name + ' cxGridViewColumnSetStoredPropertyValue');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewGridBase.cxGridViewGetStoredProperties(
|
procedure TfrViewGridBase.cxGridViewGetStoredProperties(
|
||||||
Sender: TcxCustomGridView; AProperties: TStrings);
|
Sender: TcxCustomGridView; AProperties: TStrings);
|
||||||
begin
|
begin
|
||||||
// ShowMessage('cxGridViewGetStoredProperties');
|
|
||||||
AProperties.Delete(AProperties.IndexOf('Footer'));
|
AProperties.Delete(AProperties.IndexOf('Footer'));
|
||||||
AProperties.Delete(AProperties.IndexOf('GroupByBox'));
|
AProperties.Delete(AProperties.IndexOf('GroupByBox'));
|
||||||
AProperties.Delete(AProperties.IndexOf('GroupFooters'));
|
AProperties.Delete(AProperties.IndexOf('GroupFooters'));
|
||||||
@ -284,13 +286,11 @@ end;
|
|||||||
procedure TfrViewGridBase.cxGridViewGetStoredPropertyValue(
|
procedure TfrViewGridBase.cxGridViewGetStoredPropertyValue(
|
||||||
Sender: TcxCustomGridView; const AName: string; var AValue: Variant);
|
Sender: TcxCustomGridView; const AName: string; var AValue: Variant);
|
||||||
begin
|
begin
|
||||||
// ShowMessage('cxGridViewGetStoredPropertyValue');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewGridBase.cxGridViewSetStoredPropertyValue(
|
procedure TfrViewGridBase.cxGridViewSetStoredPropertyValue(
|
||||||
Sender: TcxCustomGridView; const AName: string; const AValue: Variant);
|
Sender: TcxCustomGridView; const AName: string; const AValue: Variant);
|
||||||
begin
|
begin
|
||||||
// ShowMessage('cxGridViewSetStoredPropertyValue');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewGridBase.ExpandirTodo;
|
procedure TfrViewGridBase.ExpandirTodo;
|
||||||
@ -299,6 +299,20 @@ begin
|
|||||||
_FocusedView.ViewData.Expand(True);
|
_FocusedView.ViewData.Expand(True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewGridBase.ExportToExcel(const AFileName: string);
|
||||||
|
begin
|
||||||
|
if Assigned(_Grid) then
|
||||||
|
ExportGridToExcel(AFileName, _Grid);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewGridBase.ExportToExcel;
|
||||||
|
var
|
||||||
|
AFileName : String;
|
||||||
|
begin
|
||||||
|
if PreguntarFicheroExcelExportar(AFileName) then
|
||||||
|
ExportToExcel(AFileName);
|
||||||
|
end;
|
||||||
|
|
||||||
function TfrViewGridBase.GetDblClick: TNotifyEvent;
|
function TfrViewGridBase.GetDblClick: TNotifyEvent;
|
||||||
begin
|
begin
|
||||||
Result := FOnDblClick;
|
Result := FOnDblClick;
|
||||||
@ -356,7 +370,6 @@ begin
|
|||||||
if AObject is TcxGridDBColumn then
|
if AObject is TcxGridDBColumn then
|
||||||
with TcxGridDBColumn(AObject) do
|
with TcxGridDBColumn(AObject) do
|
||||||
begin
|
begin
|
||||||
// ShowMessage('InitStoredObject');
|
|
||||||
OnGetStoredProperties := cxGridViewColumnGetStoredProperties;
|
OnGetStoredProperties := cxGridViewColumnGetStoredProperties;
|
||||||
OnGetStoredPropertyValue := cxGridViewColumnGetStoredPropertyValue;
|
OnGetStoredPropertyValue := cxGridViewColumnGetStoredPropertyValue;
|
||||||
OnSetStoredPropertyValue := cxGridViewColumnSetStoredPropertyValue;
|
OnSetStoredPropertyValue := cxGridViewColumnSetStoredPropertyValue;
|
||||||
|
|||||||
@ -123,7 +123,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
AFile := AFileName;
|
AFile := AFileName;
|
||||||
if EsCadenaVacia(AFile) and (not DarFicheroWordExportar(AFile)) then
|
if EsCadenaVacia(AFile) and (not PreguntarFicheroWordExportar(AFile)) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
|
|||||||
@ -66,7 +66,7 @@ begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
AFile := AFileName;
|
AFile := AFileName;
|
||||||
|
|
||||||
if EsCadenaVacia(AFile) and (not DarFicheroWordExportar(AFile)) then
|
if EsCadenaVacia(AFile) and (not PreguntarFicheroWordExportar(AFile)) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
|
|||||||
@ -3,7 +3,7 @@ unit schFacturasProveedorClient_Intf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
||||||
|
|
||||||
const
|
const
|
||||||
{ Data table rules ids
|
{ Data table rules ids
|
||||||
@ -332,7 +332,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFacturasProveedorDataTableRules }
|
{ TFacturasProveedorDataTableRules }
|
||||||
TFacturasProveedorDataTableRules = class(TDADataTableRules, IFacturasProveedor)
|
TFacturasProveedorDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor)
|
||||||
private
|
private
|
||||||
f_OBSERVACIONES: IROStrings;
|
f_OBSERVACIONES: IROStrings;
|
||||||
procedure OBSERVACIONES_OnChange(Sender: TObject);
|
procedure OBSERVACIONES_OnChange(Sender: TObject);
|
||||||
@ -632,7 +632,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFacturasProveedor_DetallesDataTableRules }
|
{ TFacturasProveedor_DetallesDataTableRules }
|
||||||
TFacturasProveedor_DetallesDataTableRules = class(TDADataTableRules, IFacturasProveedor_Detalles)
|
TFacturasProveedor_DetallesDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor_Detalles)
|
||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
@ -787,7 +787,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFacturasProveedor_PedidosDataTableRules }
|
{ TFacturasProveedor_PedidosDataTableRules }
|
||||||
TFacturasProveedor_PedidosDataTableRules = class(TDADataTableRules, IFacturasProveedor_Pedidos)
|
TFacturasProveedor_PedidosDataTableRules = class(TIntfObjectDADataTableRules, IFacturasProveedor_Pedidos)
|
||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
{ Property getters and setters }
|
{ Property getters and setters }
|
||||||
|
|||||||
@ -65,7 +65,7 @@ begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
AFile := AFileName;
|
AFile := AFileName;
|
||||||
|
|
||||||
if EsCadenaVacia(AFile) and (not DarFicheroWordExportar(AFile)) then
|
if EsCadenaVacia(AFile) and (not PreguntarFicheroWordExportar(AFile)) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
|
|||||||
@ -65,7 +65,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
AFile := AFileName;
|
AFile := AFileName;
|
||||||
if EsCadenaVacia(AFile) and (not DarFicheroWordExportar(AFile)) then
|
if EsCadenaVacia(AFile) and (not PreguntarFicheroWordExportar(AFile)) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
@ -90,7 +90,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
AFile := AFileName;
|
AFile := AFileName;
|
||||||
if EsCadenaVacia(AFile) and (not DarFicheroWordExportar(AFile)) then
|
if EsCadenaVacia(AFile) and (not PreguntarFicheroWordExportar(AFile)) then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
ShowHourglassCursor;
|
ShowHourglassCursor;
|
||||||
|
|||||||
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}</ProjectGuid>
|
<ProjectGuid>{ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1}</ProjectGuid>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileVersion", "1.2.3.0\0"
|
VALUE "FileVersion", "1.2.3.0\0"
|
||||||
VALUE "ProductVersion", "1.2.3.0\0"
|
VALUE "ProductVersion", "1.2.3.0\0"
|
||||||
VALUE "CompileDate", "miércoles, 20 de agosto de 2008 10:33\0"
|
VALUE "CompileDate", "miércoles, 20 de agosto de 2008 15:40\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user