RxFPC: RXDBGrid export to PDF component

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2016-08-12 13:50:47 +00:00
parent 2ddf545806
commit cc2ab6faba
14 changed files with 1674 additions and 505 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="project1"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="3">
<Item1>
<PackageName Value="FCL"/>
</Item1>
<Item2>
<PackageName Value="rxnew"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,22 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, rxnew, Unit1,
sysutils;
{$R *.res}
begin
RequireDerivedFormResource:=True;
DefaultFormatSettings.ThousandSeparator:=' ';
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@ -0,0 +1,622 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="61">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<CursorPos X="81" Y="12"/>
<UsageCount Value="59"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="59"/>
<CursorPos X="34" Y="61"/>
<UsageCount Value="59"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
<UnitName Value="RxDBGridExportSpreadSheet"/>
<EditorIndex Value="-1"/>
<TopLine Value="143"/>
<CursorPos X="31" Y="32"/>
<UsageCount Value="16"/>
</Unit2>
<Unit3>
<Filename Value="../../rxdbgrid.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="2312"/>
<CursorPos X="30" Y="2329"/>
<UsageCount Value="24"/>
</Unit3>
<Unit4>
<Filename Value="rxdbgridexportpdf.pas"/>
<UnitName Value="RxDBGridExportPdf"/>
<EditorIndex Value="-1"/>
<TopLine Value="51"/>
<CursorPos X="69" Y="76"/>
<UsageCount Value="17"/>
</Unit4>
<Unit5>
<Filename Value="../../rxdconst.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="161"/>
<CursorPos X="18" Y="177"/>
<UsageCount Value="7"/>
</Unit5>
<Unit6>
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/classes/reader.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="964"/>
<CursorPos Y="986"/>
<UsageCount Value="7"/>
</Unit6>
<Unit7>
<Filename Value="../../../OPTORG/alexs/3/examples/testfppdf.lpr"/>
<EditorIndex Value="-1"/>
<TopLine Value="107"/>
<CursorPos Y="133"/>
<UsageCount Value="8"/>
</Unit7>
<Unit8>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-pdf/src/fppdf.pp"/>
<UnitName Value="fpPDF"/>
<EditorIndex Value="-1"/>
<TopLine Value="530"/>
<CursorPos X="15" Y="544"/>
<UsageCount Value="25"/>
</Unit8>
<Unit9>
<Filename Value="../../registerrxdb.pas"/>
<UnitName Value="RegisterRxDB"/>
<EditorIndex Value="-1"/>
<CursorPos X="23" Y="10"/>
<UsageCount Value="8"/>
</Unit9>
<Unit10>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<UnitName Value="RxDBGridExportPdf"/>
<EditorIndex Value="1"/>
<TopLine Value="548"/>
<CursorPos X="19" Y="515"/>
<UsageCount Value="27"/>
<Bookmarks Count="1">
<Item0 X="3" Y="361" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="../../rxdbgridprintgrid.pas"/>
<UnitName Value="RxDBGridPrintGrid"/>
<EditorIndex Value="-1"/>
<TopLine Value="140"/>
<CursorPos X="3" Y="145"/>
<UsageCount Value="17"/>
</Unit11>
<Unit12>
<Filename Value="../../../OPTORG/alexs/1/1/testfppdf.lpr"/>
<EditorIndex Value="-1"/>
<TopLine Value="145"/>
<CursorPos X="13" Y="166"/>
<UsageCount Value="21"/>
</Unit12>
<Unit13>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-pdf/src/fpparsettf.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="344"/>
<CursorPos Y="365"/>
<UsageCount Value="13"/>
</Unit13>
<Unit14>
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/sysutilh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="97"/>
<CursorPos X="19" Y="112"/>
<UsageCount Value="7"/>
</Unit14>
<Unit15>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-pdf/src/fpttfencodings.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="2025"/>
<CursorPos X="3" Y="2100"/>
<UsageCount Value="7"/>
</Unit15>
<Unit16>
<Filename Value="../../../lazutils/lazfreetypefontcollection.pas"/>
<UnitName Value="LazFreeTypeFontCollection"/>
<EditorIndex Value="-1"/>
<TopLine Value="345"/>
<CursorPos X="3" Y="347"/>
<UsageCount Value="21"/>
</Unit16>
<Unit17>
<Filename Value="../../../lazutils/easylazfreetype.pas"/>
<UnitName Value="EasyLazFreeType"/>
<EditorIndex Value="-1"/>
<TopLine Value="1563"/>
<CursorPos X="3" Y="1550"/>
<UsageCount Value="21"/>
</Unit17>
<Unit18>
<Filename Value="../../../../examples/lazfreetype/mainform.pas"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="-1"/>
<TopLine Value="51"/>
<CursorPos X="78" Y="61"/>
<UsageCount Value="7"/>
</Unit18>
<Unit19>
<Filename Value="../../../lazutils/ttfile.pas"/>
<UnitName Value="TTFile"/>
<EditorIndex Value="-1"/>
<TopLine Value="233"/>
<CursorPos Y="249"/>
<UsageCount Value="9"/>
</Unit19>
<Unit20>
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/finah.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="10"/>
<CursorPos X="10" Y="25"/>
<UsageCount Value="9"/>
</Unit20>
<Unit21>
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/fina.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="100"/>
<CursorPos X="3" Y="105"/>
<UsageCount Value="9"/>
</Unit21>
<Unit22>
<Filename Value="../../../install/source/fpcsrc/rtl/inc/fexpand.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="226"/>
<CursorPos X="10" Y="106"/>
<UsageCount Value="7"/>
</Unit22>
<Unit23>
<Filename Value="../../../tachart/tadraweropengl.pas"/>
<UnitName Value="TADrawerOpenGL"/>
<EditorIndex Value="-1"/>
<TopLine Value="218"/>
<CursorPos Y="220"/>
<UsageCount Value="13"/>
</Unit23>
<Unit24>
<Filename Value="../../../lazutils/fileutil.pas"/>
<UnitName Value="FileUtil"/>
<EditorIndex Value="-1"/>
<CursorPos X="14" Y="22"/>
<UsageCount Value="9"/>
</Unit24>
<Unit25>
<Filename Value="../../../lazutils/fileutil.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="1013"/>
<CursorPos Y="1031"/>
<UsageCount Value="7"/>
</Unit25>
<Unit26>
<Filename Value="../../../lazutils/lazfileutils.pas"/>
<UnitName Value="LazFileUtils"/>
<EditorIndex Value="-1"/>
<TopLine Value="719"/>
<CursorPos Y="736"/>
<UsageCount Value="7"/>
</Unit26>
<Unit27>
<Filename Value="../../../tachart/backup/tadraweropengl.pas"/>
<UnitName Value="TADrawerOpenGL"/>
<EditorIndex Value="-1"/>
<TopLine Value="208"/>
<CursorPos X="20" Y="224"/>
<UsageCount Value="7"/>
</Unit27>
<Unit28>
<Filename Value="unit1.lfm"/>
<EditorIndex Value="-1"/>
<TopLine Value="231"/>
<UsageCount Value="8"/>
<DefaultSyntaxHighlighter Value="LFM"/>
</Unit28>
<Unit29>
<Filename Value="../../../lazreport/source/lr_class.pas"/>
<UnitName Value="LR_Class"/>
<EditorIndex Value="-1"/>
<TopLine Value="3503"/>
<CursorPos X="3" Y="3506"/>
<UsageCount Value="8"/>
</Unit29>
<Unit30>
<Filename Value="C:/lazarus/components/lazutils/easylazfreetype.pas"/>
<UnitName Value="EasyLazFreeType"/>
<EditorIndex Value="-1"/>
<CursorPos X="14" Y="160"/>
<UsageCount Value="8"/>
</Unit30>
<Unit31>
<Filename Value="C:/lazarus/components/lazutils/lazfreetypefontcollection.pas"/>
<UnitName Value="LazFreeTypeFontCollection"/>
<EditorIndex Value="-1"/>
<TopLine Value="127"/>
<CursorPos X="50" Y="141"/>
<UsageCount Value="8"/>
</Unit31>
<Unit32>
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="76"/>
<CursorPos X="56" Y="91"/>
<UsageCount Value="10"/>
</Unit32>
<Unit33>
<Filename Value="../../../install/source/fpcsrc/rtl/objpas/sysutils/sysinth.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="122"/>
<CursorPos X="58" Y="137"/>
<UsageCount Value="8"/>
</Unit33>
<Unit34>
<Filename Value="../../vclutils.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="125"/>
<CursorPos Y="155"/>
<UsageCount Value="8"/>
</Unit34>
<Unit35>
<Filename Value="../../rxshortcutunit.pas"/>
<ComponentName Value="rxShortCutForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="rxShortCutUnit"/>
<EditorIndex Value="-1"/>
<TopLine Value="13"/>
<UsageCount Value="8"/>
</Unit35>
<Unit36>
<Filename Value="../../rxctrls.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="40"/>
<UsageCount Value="8"/>
</Unit36>
<Unit37>
<Filename Value="../../rxapputils.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="28"/>
<CursorPos X="83" Y="64"/>
<UsageCount Value="8"/>
</Unit37>
<Unit38>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/sqldb/sqldb.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="439"/>
<CursorPos X="3" Y="454"/>
<UsageCount Value="10"/>
</Unit38>
<Unit39>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="1339"/>
<CursorPos X="3" Y="1354"/>
<UsageCount Value="9"/>
</Unit39>
<Unit40>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/dataset.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="473"/>
<CursorPos X="3" Y="476"/>
<UsageCount Value="10"/>
</Unit40>
<Unit41>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/bufdataset.pas"/>
<UnitName Value="BufDataset"/>
<EditorIndex Value="-1"/>
<TopLine Value="458"/>
<CursorPos X="3" Y="446"/>
<UsageCount Value="10"/>
<Bookmarks Count="1">
<Item0 X="3" Y="3449" ID="1"/>
</Bookmarks>
</Unit41>
<Unit42>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/base/bufdataset_parser.pp"/>
<EditorIndex Value="-1"/>
<CursorPos X="20" Y="18"/>
<UsageCount Value="9"/>
</Unit42>
<Unit43>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf_prscore.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="34"/>
<CursorPos X="3" Y="43"/>
<UsageCount Value="9"/>
</Unit43>
<Unit44>
<Filename Value="../../rxmemds.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="25"/>
<CursorPos X="47" Y="40"/>
<UsageCount Value="10"/>
<Bookmarks Count="1">
<Item0 X="33" Y="131" ID="2"/>
</Bookmarks>
</Unit44>
<Unit45>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/memds/memds.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="136"/>
<CursorPos X="14" Y="155"/>
<UsageCount Value="8"/>
</Unit45>
<Unit46>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="2336"/>
<CursorPos X="3" Y="2338"/>
<UsageCount Value="8"/>
</Unit46>
<Unit47>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf_parser.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="162"/>
<CursorPos X="5" Y="87"/>
<UsageCount Value="8"/>
</Unit47>
<Unit48>
<Filename Value="../../rxdb/rxmemds_parser.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="186"/>
<CursorPos X="3" Y="189"/>
<UsageCount Value="9"/>
</Unit48>
<Unit49>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-db/src/dbase/dbf_common.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="95"/>
<CursorPos X="10" Y="110"/>
<UsageCount Value="9"/>
</Unit49>
<Unit50>
<Filename Value="../../../../lcl/grids.pas"/>
<UnitName Value="Grids"/>
<EditorIndex Value="-1"/>
<TopLine Value="1972"/>
<CursorPos X="21" Y="1976"/>
<UsageCount Value="12"/>
</Unit50>
<Unit51>
<Filename Value="../../../lazutils/lazfreetype.pas"/>
<UnitName Value="LazFreeType"/>
<EditorIndex Value="-1"/>
<TopLine Value="76"/>
<CursorPos Y="76"/>
<UsageCount Value="9"/>
</Unit51>
<Unit52>
<Filename Value="../../../lazutils/ttobjs.pas"/>
<UnitName Value="TTObjs"/>
<EditorIndex Value="-1"/>
<UsageCount Value="9"/>
</Unit52>
<Unit53>
<Filename Value="../../../lazutils/tttables.pas"/>
<UnitName Value="TTTables"/>
<EditorIndex Value="-1"/>
<UsageCount Value="9"/>
</Unit53>
<Unit54>
<Filename Value="../../../../lcl/dbgrids.pas"/>
<UnitName Value="DBGrids"/>
<EditorIndex Value="-1"/>
<TopLine Value="4071"/>
<CursorPos Y="4090"/>
<UsageCount Value="11"/>
</Unit54>
<Unit55>
<Filename Value="../../../../lcl/graphics.pp"/>
<UnitName Value="Graphics"/>
<EditorIndex Value="-1"/>
<TopLine Value="1959"/>
<CursorPos X="29" Y="1970"/>
<UsageCount Value="10"/>
</Unit55>
<Unit56>
<Filename Value="../../../../lcl/lcltype.pp"/>
<UnitName Value="LCLType"/>
<EditorIndex Value="-1"/>
<TopLine Value="1629"/>
<CursorPos X="3" Y="1644"/>
<UsageCount Value="10"/>
</Unit56>
<Unit57>
<Filename Value="../../../install/source/fpcsrc/packages/fcl-image/src/fpimage.pp"/>
<UnitName Value="FPimage"/>
<EditorIndex Value="-1"/>
<TopLine Value="37"/>
<CursorPos X="4" Y="45"/>
<UsageCount Value="10"/>
</Unit57>
<Unit58>
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
<ComponentName Value="RxDBGridExportPdfSetupForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
<EditorIndex Value="2"/>
<TopLine Value="56"/>
<CursorPos X="5" Y="83"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit58>
<Unit59>
<Filename Value="../../rxdbgridexportspreadsheet_paramsunit.pas"/>
<ComponentName Value="RxDBGridExportSpreadSheet_ParamsForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RxDBGridExportSpreadSheet_ParamsUnit"/>
<EditorIndex Value="-1"/>
<TopLine Value="31"/>
<CursorPos X="3" Y="46"/>
<UsageCount Value="10"/>
</Unit59>
<Unit60>
<Filename Value="../../../../lcl/controls.pp"/>
<UnitName Value="Controls"/>
<EditorIndex Value="-1"/>
<TopLine Value="5"/>
<CursorPos X="14" Y="19"/>
<UsageCount Value="10"/>
</Unit60>
</Units>
<JumpHistory Count="27" HistoryIndex="26">
<Position1>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="277" Column="53" TopLine="252"/>
</Position1>
<Position2>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="142" Column="15" TopLine="127"/>
</Position2>
<Position3>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="275" Column="70" TopLine="261"/>
</Position3>
<Position4>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="285" TopLine="226"/>
</Position4>
<Position5>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="239" Column="61" TopLine="236"/>
</Position5>
<Position6>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="208" Column="20" TopLine="203"/>
</Position6>
<Position7>
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
<Caret Line="18" Column="30"/>
</Position7>
<Position8>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="136" Column="89" TopLine="129"/>
</Position8>
<Position9>
<Filename Value="../../rxdbgridexportpdf.pas"/>
<Caret Line="477" Column="34" TopLine="457"/>
</Position9>
<Position10>
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
<Caret Line="67" TopLine="39"/>
</Position10>
<Position11>
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
<Caret Line="83" TopLine="53"/>
</Position11>
<Position12>
<Filename Value="../../rxdbgridexportpdfsetupunit.pas"/>
<Caret Line="82" Column="5" TopLine="56"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
<Caret Line="166" Column="3" TopLine="148"/>
</Position13>
<Position14>
<Filename Value="unit1.pas"/>
<Caret Line="165" Column="3" TopLine="147"/>
</Position14>
<Position15>
<Filename Value="unit1.pas"/>
<Caret Line="164" Column="3" TopLine="146"/>
</Position15>
<Position16>
<Filename Value="unit1.pas"/>
<Caret Line="167" Column="54" TopLine="146"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
<Caret Line="157" Column="44" TopLine="127"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="156" Column="44" TopLine="126"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
<Caret Line="137" Column="65" TopLine="127"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="10" Column="22" TopLine="166"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="150" TopLine="161"/>
</Position22>
<Position23>
<Filename Value="unit1.pas"/>
<Caret Line="188" TopLine="164"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
<Caret Line="155" TopLine="139"/>
</Position24>
<Position25>
<Filename Value="unit1.pas"/>
<Caret Line="156" TopLine="139"/>
</Position25>
<Position26>
<Filename Value="unit1.pas"/>
<Caret Line="157" TopLine="139"/>
</Position26>
<Position27>
<Filename Value="unit1.pas"/>
<Caret Line="164" Column="42" TopLine="153"/>
</Position27>
</JumpHistory>
</ProjectSession>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../../lazutils/lazfreetypefontcollection.pas"/>
<Line Value="423"/>
</Item1>
</BreakPoints>
<Watches Count="4">
<Item1>
<Expression Value="fName"/>
</Item1>
<Item2>
<Expression Value="C"/>
<DisplayStyle Value="wdfHex"/>
</Item2>
<Item3>
<Expression Value="A"/>
</Item3>
<Item4>
<Expression Value="Result"/>
<DisplayStyle Value="wdfHex"/>
</Item4>
</Watches>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,355 @@
object Form1: TForm1
Left = 558
Height = 397
Top = 319
Width = 1043
Caption = 'Form1'
ClientHeight = 397
ClientWidth = 1043
OnClose = FormClose
OnCreate = FormCreate
LCLVersion = '1.7'
object Panel1: TPanel
Left = 0
Height = 50
Top = 347
Width = 1043
Align = alBottom
AutoSize = True
ClientHeight = 50
ClientWidth = 1043
TabOrder = 0
object Button1: TButton
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Panel1
Left = 476
Height = 36
Top = 7
Width = 90
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Create PDF'
OnClick = Button1Click
TabOrder = 0
end
object CheckBox1: TCheckBox
Left = 1
Height = 24
Top = 18
Width = 99
Caption = 'CheckBox1'
OnChange = CheckBox1Change
TabOrder = 1
end
object Edit1: TEdit
Left = 137
Height = 37
Top = 7
Width = 295
TabOrder = 2
Text = 'ID=1'
end
end
object PageControl1: TPageControl
Left = 0
Height = 347
Top = 0
Width = 1043
ActivePage = TabSheet1
Align = alClient
TabIndex = 0
TabOrder = 1
object TabSheet1: TTabSheet
Caption = 'Test data'
ClientHeight = 313
ClientWidth = 1033
object RxDBGrid1: TRxDBGrid
Left = 0
Height = 313
Top = 0
Width = 1033
ColumnDefValues.BlobText = '(данные)'
TitleButtons = False
AutoSort = True
Columns = <
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'ID'
Width = 50
FieldName = 'ID'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Color = clCream
Font.Color = clPurple
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Наименование продукта'
Width = 364
FieldName = 'NAME'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Color = clYellow
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Дата поставки'
Width = 90
FieldName = 'PDATE'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Сумма'
Width = 100
FieldName = 'SUM'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Страна'
Width = 200
FieldName = 'Country'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'Город'
Width = 200
FieldName = 'Sity'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Нет)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footers = <>
end>
KeyStrokes = <
item
Command = rxgcShowFindDlg
ShortCut = 16454
Enabled = True
end
item
Command = rxgcShowColumnsDlg
ShortCut = 16471
Enabled = True
end
item
Command = rxgcShowFilterDlg
ShortCut = 16468
Enabled = True
end
item
Command = rxgcShowSortDlg
ShortCut = 16467
Enabled = True
end
item
Command = rxgcShowQuickFilter
ShortCut = 16465
Enabled = True
end
item
Command = rxgcHideQuickFilter
ShortCut = 16456
Enabled = True
end
item
Command = rxgcSelectAll
ShortCut = 16449
Enabled = True
end
item
Command = rxgcDeSelectAll
ShortCut = 16429
Enabled = True
end
item
Command = rxgcInvertSelection
ShortCut = 16426
Enabled = True
end
item
Command = rxgcOptimizeColumnsWidth
ShortCut = 16427
Enabled = True
end
item
Command = rxgcCopyCellValue
ShortCut = 16451
Enabled = True
end>
FooterOptions.DrawFullLine = False
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter, rdgAllowToolMenu]
Align = alClient
Color = clWindow
DrawFullLine = False
FocusColor = clRed
SelectedColor = clHighlight
GridLineStyle = psSolid
DataSource = DataSource1
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
ParentColor = False
TabOrder = 0
end
end
object TabSheet2: TTabSheet
Caption = 'Debug window'
ClientHeight = 313
ClientWidth = 1033
object Memo1: TMemo
Left = 0
Height = 313
Top = 0
Width = 1033
Align = alClient
Lines.Strings = (
'Memo1'
)
TabOrder = 0
end
end
end
object RxMemoryData1: TRxMemoryData
FieldDefs = <
item
Name = 'ID'
DataType = ftAutoInc
end
item
Name = 'NAME'
DataType = ftString
Size = 220
end
item
Name = 'PDATE'
DataType = ftDate
end
item
Name = 'SUM'
DataType = ftCurrency
end
item
Name = 'Country'
DataType = ftString
Size = 100
end
item
Name = 'Sity'
DataType = ftString
Size = 100
end>
PacketRecords = 0
left = 136
top = 88
object RxMemoryData1ID: TAutoIncField
FieldKind = fkData
FieldName = 'ID'
Index = 0
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
object RxMemoryData1NAME: TStringField
FieldKind = fkData
FieldName = 'NAME'
Index = 1
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 220
end
object RxMemoryData1PDATE: TDateField
FieldKind = fkData
FieldName = 'PDATE'
Index = 2
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
object RxMemoryData1SUM: TCurrencyField
FieldKind = fkData
FieldName = 'SUM'
Index = 3
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
MaxValue = 0
MinValue = 0
Precision = 2
end
object RxMemoryData1Country: TStringField
FieldKind = fkData
FieldName = 'Country'
Index = 4
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 100
end
object RxMemoryData1Sity: TStringField
FieldKind = fkData
FieldName = 'Sity'
Index = 5
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 100
end
end
object DataSource1: TDataSource
DataSet = RxMemoryData1
left = 104
top = 88
end
object RxDBGridExportPDF1: TRxDBGridExportPDF
RxDBGrid = RxDBGrid1
Caption = 'Export to PDF file'
ShowSetupForm = True
FileName = 'test111.pdf'
Options = [repExportTitle, repExportColors, repExportFooter]
PdfOptions.Options = []
OpenAfterExport = True
AuthorPdf = 'Лагунов А.А.'
ProducerPdf = 'alexs'
left = 112
top = 160
end
end

View File

@ -0,0 +1,230 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, rxmemds, rxdbgrid,
RxDBGridExportPdf, Forms, Controls, Graphics,
Dialogs, ExtCtrls, StdCtrls, ComCtrls, db;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
CheckBox1: TCheckBox;
DataSource1: TDataSource;
Edit1: TEdit;
Memo1: TMemo;
PageControl1: TPageControl;
Panel1: TPanel;
RxDBGrid1: TRxDBGrid;
RxDBGridExportPDF1: TRxDBGridExportPDF;
RxMemoryData1: TRxMemoryData;
RxMemoryData1Country: TStringField;
RxMemoryData1ID: TAutoIncField;
RxMemoryData1NAME: TStringField;
RxMemoryData1PDATE: TDateField;
RxMemoryData1Sity: TStringField;
RxMemoryData1SUM: TCurrencyField;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
procedure Button1Click(Sender: TObject);
procedure CheckBox1Change(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
private
FontDirList: TStrings;
procedure InitFonts;
procedure ShowInfo(AText:string; AParams : array of const);
procedure DebugFonts;
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
uses EasyLazFreeType, LazFreeTypeFontCollection,
LazFileUtils;
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
PageControl1.ActivePageIndex:=0;
RxMemoryData1.Open;
RxMemoryData1.AppendRecord([1, 'Строка с длинным текстом 1', now, 100, 'Россия', 'Москва']);
RxMemoryData1.AppendRecord([2, 'Строка с длинным текстом 2', now - 1, 100, 'Россия', 'Ставрополь']);
RxMemoryData1.AppendRecord([3, 'Строка с длинным текстом 3', now - 2, 110, 'Россия', 'Калининград']);
RxMemoryData1.AppendRecord([4, 'Строка с длинным текстом 4', now - 3, 5000, 'Россия', 'Владивасток']);
RxMemoryData1.AppendRecord([5, 'Строка с длинным текстом 5', now - 4, 123.31, 'USA', 'New-York']);
RxMemoryData1.AppendRecord([6, 'Строка с длинным текстом 6', now, 100, 'Россия', 'Москва']);
RxMemoryData1.AppendRecord([7, 'Строка с длинным текстом 7', now - 1, 100, 'Россия', 'Ставрополь']);
RxMemoryData1.AppendRecord([8, 'Строка с длинным текстом 8', now - 2, 110, 'Россия', 'Калининград']);
RxMemoryData1.AppendRecord([9, 'Строка с длинным текстом 9', now - 3, 5000, 'Россия', 'Владивасток']);
RxMemoryData1.AppendRecord([10,'Строка с длинным текстом 10', now - 4, 123.31, 'USA', 'New-York']);
RxMemoryData1.AppendRecord([11,'Строка с длинным текстом 11', now, 100, 'Россия', 'Москва']);
RxMemoryData1.AppendRecord([12,'Строка с длинным текстом 12', now - 1, 100, 'Россия', 'Ставрополь']);
RxMemoryData1.AppendRecord([13,'Строка с длинным текстом 13', now - 2, 110, 'Россия', 'Калининград']);
RxMemoryData1.AppendRecord([14,'Строка с длинным текстом 14', now - 3, 5000, 'Россия', 'Владивасток']);
RxMemoryData1.AppendRecord([15,'Строка с длинным текстом 15', now - 4, 123.31, 'USA', 'New-York']);
RxMemoryData1.AppendRecord([16,'Строка с длинным текстом 16', now, 100, 'Россия', 'Москва']);
RxMemoryData1.AppendRecord([17,'Строка с длинным текстом 17', now - 1, 100, 'Россия', 'Ставрополь']);
RxMemoryData1.AppendRecord([18,'Строка с длинным текстом 18', now - 2, 110, 'Россия', 'Калининград']);
RxMemoryData1.AppendRecord([19,'Строка с длинным текстом 19', now - 3, 5000, 'Россия', 'Владивасток']);
RxMemoryData1.AppendRecord([20,'Строка с длинным текстом 20', now - 4, 123.31, 'USA', 'New-York']);
DebugFonts;
end;
procedure TForm1.InitFonts;
procedure CreateFontDirList;
var
s: String;
begin
FontDirList := TStringList.Create;
{$IFDEF WINDOWS}
s := SHGetFolderPathUTF8(20); // CSIDL_FONTS = 20
if s <> '' then
FontDirList.Add(s);
{$ENDIF}
{$IFDEF linux}
FontDirList.Add('/usr/share/cups/fonts/');
FontDirList.Add('/usr/share/fonts/');
FontDirList.Add('/usr/local/lib/X11/fonts/');
FontDirList.Add(GetUserDir + '.fonts/');
{$ENDIF}
end;
{ Duplicates functionality in FontCollection.AddFolder in order to be able to
ignore exceptions due to font read errors (occur on Linux Mint with font
NanumMyeongjo.ttf }
procedure AddFolder(AFolder: string);
var
files: TStringList;
i: integer;
begin
AFolder := ExpandFileName(AFolder);
if (length(AFolder) <> 0) and (AFolder[length(AFolder)] <> PathDelim) then
AFolder += PathDelim;
files := TStringList.Create;
FontCollection.BeginUpdate;
try
FindAllFiles(files, AFolder, '*.ttf', true);
files.Sort;
for i := 0 to files.Count-1 do
try
FontCollection.AddFile(files[i]);
except
end;
finally
FontCollection.EndUpdate;
files.Free;
end;
end;
var
i: Integer;
begin
if FontDirList = nil then
CreateFontDirList;
for i:=0 to FontDirList.Count-1 do
AddFolder(FontDirList[i]);
end;
procedure TForm1.ShowInfo(AText: string; AParams: array of const);
begin
Memo1.Lines.Add(Format(AText, AParams));
end;
procedure TForm1.DebugFonts;
procedure DumpFamaly(AFontFamely:string);
var
FFM: TCustomFamilyCollectionItem;
I: Integer;
FFI: TCustomFontCollectionItem;
begin
FFM:=FontCollection.Family[AFontFamely];
if not Assigned(FFM) then
begin
ShowInfo('Font Family %s NOT FOUND!', [AFontFamely]);
exit;
end;
ShowInfo('In Family %s count fonts : %d', [AFontFamely, FFM.FontCount]);
for I:=0 to FFM.FontCount-1 do
begin
FFI:=FFM.Font[i];
ShowInfo('Font in file %s - NAME: %s. Styles = %s', [FFI.Filename, FFI.Information[ftiFullName], FFI.Styles]);
end;
FFI:=FFM.GetFont('Regular');
if Assigned(FFI) then
ShowInfo('REGULAR Font in file %s - NAME: %s', [FFI.Filename, FFI.Information[ftiFullName]])
else
ShowInfo('Regular font not found', []);
end;
begin
InitFonts;
Memo1.Lines.Clear;
if Assigned(FontCollection) then
begin
ShowInfo('FontCollection.FontFileCount = %d', [FontCollection.FontFileCount]);
ShowInfo('FontCollection.FamilyCount = %d', [FontCollection.FamilyCount]);
DumpFamaly('Arial');
DumpFamaly('Sans');
DumpFamaly('Serif');
DumpFamaly('Liberation Sans');
end
else
Memo1.Text:='FontCollection not assigned';
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
RxDBGridExportPDF1.Execute;
end;
procedure TForm1.CheckBox1Change(Sender: TObject);
begin
if CheckBox1.Checked then
begin
RxMemoryData1.Filter:=Edit1.Text;
end;
RxMemoryData1.Filtered:=CheckBox1.Checked;
end;
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
FreeAndNil(FontDirList);
end;
end.
{
'Conakry'
'DejaVu Sans'
'DejaVu Sans Condensed'
'DejaVu Sans Light'
'DejaVu Sans Mono'
'DejaVu Serif'
'DejaVu Serif Condensed'
'Denemo'
'FreeSans'
'Caladea'
'Carlito'
}

View File

@ -2481,17 +2481,7 @@ function TRxDBGrid.GetFooterRowCount: integer;
begin
Result:=FFooterOptions.RowCount;
end;
{
function TRxDBGrid.GetMarkerDown: TBitmap;
begin
Result:=FMarkerDown;
end;
function TRxDBGrid.GetMarkerUp: TBitmap;
begin
Result:=FMarkerUp;
end;
}
function TRxDBGrid.GetDrawFullLine: boolean;
begin
Result := FFooterOptions.FDrawFullLine;
@ -6031,433 +6021,6 @@ begin
inherited Destroy;
end;
(*
{ TRxColumnFooter }
procedure TRxColumnFooter.SetValue(const AValue: string);
begin
if FValue = AValue then
exit;
FValue := AValue;
FOwner.ColumnChanged;
end;
procedure TRxColumnFooter.SetDisplayFormat(const AValue: string);
begin
if FDisplayFormat = AValue then
exit;
FDisplayFormat := AValue;
FOwner.ColumnChanged;
end;
procedure TRxColumnFooter.SetAlignment(const AValue: TAlignment);
begin
if FAlignment = AValue then
exit;
FAlignment := AValue;
FOwner.ColumnChanged;
end;
procedure TRxColumnFooter.FontChanged(Sender: TObject);
begin
FisDefaultFont := False;
FOwner.ColumnChanged;
end;
function TRxColumnFooter.GetFont: TFont;
begin
result := FFont;
end;
function TRxColumnFooter.IsFontStored: Boolean;
begin
result := not FisDefaultFont;
end;
procedure TRxColumnFooter.SetFieldName(const AValue: string);
begin
if FFieldName = AValue then
exit;
FFieldName := AValue;
FOwner.ColumnChanged;
end;
procedure TRxColumnFooter.SetFont(AValue: TFont);
begin
if not FFont.IsEqual(AValue) then
FFont.Assign(AValue);
end;
procedure TRxColumnFooter.SetLayout(const AValue: TTextLayout);
begin
if FLayout = AValue then
exit;
FLayout := AValue;
FOwner.ColumnChanged;
end;
procedure TRxColumnFooter.SetValueType(const AValue: TFooterValueType);
begin
if FValueType = AValue then
exit;
FValueType := AValue;
if FValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then
TRxDBGrid(FOwner.Grid).CalcStatTotals;
FOwner.ColumnChanged;
end;
function TRxColumnFooter.DisplayText: string;
begin
case FValueType of
fvtSum,
fvtAvg,
fvtMax,
fvtMin: Result := GetStatTotal;
fvtCount: Result := GetRecordsCount;
fvtFieldValue: Result := GetFieldValue;
fvtStaticText: Result := FValue;
fvtRecNo: Result := GetRecNo;
else
Result := '';
end;
end;
procedure TRxColumnFooter.FillDefaultFont;
var
AGrid: TCustomGrid;
begin
AGrid := FOwner.Grid;
if (AGrid<>nil) then
begin
FFont.Assign(AGrid.Font);
FIsDefaultFont := True;
end;
end;
function TRxColumnFooter.GetFieldValue: string;
begin
if (FFieldName <> '') and TRxDBGrid(FOwner.Grid).DatalinkActive then
Result := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName).AsString
else
Result := '';
end;
function TRxColumnFooter.GetRecordsCount: string;
begin
if TRxDBGrid(FOwner.Grid).DatalinkActive then
begin
if DisplayFormat <> '' then
Result := Format(DisplayFormat,
[{TRxDBGrid(FOwner.Grid).DataSource.DataSet.RecordCount} FCountRec])
else
Result := IntToStr(FCountRec); //TRxDBGrid(FOwner.Grid).DataSource.DataSet.RecordCount);
end
else
Result := '';
end;
function TRxColumnFooter.GetRecNo: string;
begin
if TRxDBGrid(FOwner.Grid).DatalinkActive then
begin
if DisplayFormat <> '' then
Result := Format(DisplayFormat, [TRxDBGrid(FOwner.Grid).DataSource.DataSet.RecNo])
else
Result := IntToStr(TRxDBGrid(FOwner.Grid).DataSource.DataSet.RecNo);
end
else
Result := '';
end;
function TRxColumnFooter.GetStatTotal: string;
var
F: TField;
begin
if (FFieldName <> '') and TRxDBGrid(FOwner.Grid).DatalinkActive and
(TRxDBGrid(FOwner.Grid).DataSource.DataSet.RecordCount <> 0) then
begin
F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName);
if Assigned(F) then
begin
if F.DataType in [ftSmallint, ftInteger, ftWord, ftFloat, ftCurrency,
ftDate, ftTime, ftDateTime, ftTimeStamp, ftLargeint, ftBCD] then
begin
if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then
begin
if FValueType in [fvtSum, fvtAvg] then
Result := ''
else
if FTestValue = 0 then
Result := ''
else
if FDisplayFormat = '' then
Result := DateToStr(FTestValue)
else
Result := FormatDateTime(FDisplayFormat, FTestValue);
end
else
if F.DataType in [ftSmallint, ftInteger, ftWord, ftLargeint] then
begin
if FDisplayFormat = '' then
Result := IntToStr(Round(FTestValue))
else
Result := Format(FDisplayFormat, [Round(FTestValue)]);
end
else
begin
if FDisplayFormat <> '' then
Result := FormatFloat(FDisplayFormat, FTestValue)
else
if F.DataType = ftCurrency then
Result := FloatToStrF(FTestValue, ffCurrency, 12, 2)
else
Result := FloatToStr(FTestValue);
end;
end
else
Result := '';
end
else
Result := '';
end
else
Result := '';
end;
procedure TRxColumnFooter.ResetTestValue;
var
F: TField;
begin
FTestValue := 0;
FCountRec:=0;
if (ValueType in [fvtMin, fvtMax]) and (TRxDBGrid(
FOwner.Grid).DataSource.DataSet.RecordCount <> 0) then
begin
F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName);
if (Assigned(F)) and not (F.IsNull) then
if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then
FTestValue := F.AsDateTime
else
FTestValue := F.AsFloat;
end;
end;
procedure TRxColumnFooter.UpdateTestValue;
var
F: TField;
begin
if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then
begin
F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FindField(FFieldName);
if Assigned(F) then
begin
if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then
begin
case FValueType of
fvtMax: FTestValue := Max(FTestValue, F.AsDateTime);
fvtMin: FTestValue := Min(FTestValue, F.AsDateTime);
end;
end
else
begin
case FValueType of
fvtSum: FTestValue := FTestValue + F.AsFloat;
// fvtAvg:
fvtMax: FTestValue := Max(FTestValue, F.AsFloat);
fvtMin: FTestValue := Min(FTestValue, F.AsFloat);
end;
end;
end;
end;
end;
function TRxColumnFooter.DeleteTestValue: boolean;
var
F: TField;
begin
Result := True;
if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then
begin
F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName);
if (Assigned(F)) and not (F.IsNull) then
if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then
Result := not ((FValueType in [fvtMax, fvtMin]) and (FTestValue = F.AsDateTime))
else
if FValueType in [fvtMax, fvtMin] then
Result := (FTestValue <> F.AsFloat)
else
FTestValue := FTestValue - F.AsFloat;
end;
end;
function TRxColumnFooter.PostTestValue: boolean;
var
F: TField;
begin
Result := True;
if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then
begin
F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName);
if Assigned(F) then
if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then
begin
if FValueType in [fvtMax, fvtMin] then
if F.DataSet.State = dsinsert then
begin
if not (F.IsNull) then
case FValueType of
fvtMax: FTestValue := Max(FTestValue, F.AsDateTime);
fvtMin: FTestValue := Min(FTestValue, F.AsDateTime);
end;
end
else
if (F.OldValue <> null) and (FTestValue = TDateTime(F.OldValue)) then
Result := False
else
if not F.IsNull then
case FValueType of
fvtMax: FTestValue := Max(FTestValue, F.AsDateTime);
fvtMin: FTestValue := Min(FTestValue, F.AsDateTime);
end;
end
else
if F.DataSet.State = dsinsert then
begin
if not F.IsNull then
case FValueType of
fvtSum: FTestValue := FTestValue + F.AsFloat;
fvtMax: FTestValue := Max(FTestValue, F.AsFloat);
fvtMin: FTestValue := Min(FTestValue, F.AsFloat);
end;
end
else
if (FValueType in [fvtMax, fvtMin]) and (F.OldValue <> null) and
(FTestValue = Float(F.OldValue)) then
Result := False
else
case FValueType of
fvtSum:
begin
if not F.IsNull then
begin
if F.OldValue <> null then
FTestValue := FTestValue - Float(F.OldValue);
FTestValue := FTestValue + F.AsFloat;
end;
end;
fvtMax: if not F.IsNull then
FTestValue := Max(FTestValue, F.AsFloat);
fvtMin: if not F.IsNull then
FTestValue := Min(FTestValue, F.AsFloat);
end;
end;
end;
function TRxColumnFooter.ErrorTestValue: boolean;
var
F: TField;
begin
Result := True;
if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then
begin
F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName);
if Assigned(F) then
begin
if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then
begin
if (FValueType in [fvtMax, fvtMin]) and not (F.IsNull) then
begin
if not (F.IsNull) and (FTestValue = F.AsDateTime) then
Result := False
else
if (F.DataSet.RecordCount <> 0) and (F.OldValue <> null) then
begin
case FValueType of
fvtMax: FTestValue := Max(FTestValue, TDateTime(F.OldValue));
fvtMin: FTestValue := Min(FTestValue, TDateTime(F.OldValue));
end;
end;
end;
end
else
if (FValueType in [fvtMax, fvtMin]) and not (F.IsNull) and (FTestValue = F.AsFloat) then
Result := False
else
begin
case FValueType of
fvtSum:
if F.DataSet.RecordCount = 0 then
begin
{ if not F.IsNull then
FTestValue := FTestValue - F.AsFloat;}
{ TODO -oalexs : need rewrite this code - where difficult! }
end
else
begin
if F.OldValue <> null then
FTestValue := FTestValue + Float(F.OldValue);
if not F.IsNull then
FTestValue := FTestValue - F.AsFloat;
end;
fvtMax:
if (F.DataSet.RecordCount <> 0) and (F.OldValue <> null) then
FTestValue := Max(FTestValue, Float(F.OldValue));
fvtMin:
if (F.DataSet.RecordCount <> 0) and (F.OldValue <> null) then
FTestValue := Min(FTestValue, Float(F.OldValue));
end;
end;
end;
end;
end;
procedure TRxColumnFooter.UpdateTestValueFromVar(AValue: Variant);
begin
if FValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then
begin
if (not VarIsEmpty(AValue)) and (AValue <> null) and Assigned(FField) then
begin
if FField.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then
begin
case FValueType of
fvtMax: FTestValue := Max(FTestValue, AValue);
fvtMin: FTestValue := Min(FTestValue, AValue);
end;
end
else
begin
case FValueType of
fvtSum,
fvtAvg: FTestValue := FTestValue + AValue;
fvtMax: FTestValue := Max(FTestValue, AValue);
fvtMin: FTestValue := Min(FTestValue, AValue);
end;
end;
end;
end;
end;
///!
constructor TRxColumnFooter.Create(Owner: TRxColumn);
begin
inherited Create;
FOwner := Owner;
FTestValue := 0;
FLayout := tlCenter;
FFont := TFont.Create;
FillDefaultFont;
FFont.OnChange := @FontChanged;
end;
destructor TRxColumnFooter.Destroy;
begin
FreeThenNil(FFont);
inherited Destroy;
end;
*)
{ TFilterListCellEditor }
procedure TFilterListCellEditor.WndProc(var TheMessage: TLMessage);

View File

@ -37,7 +37,7 @@ interface
{$IF (FPC_FULLVERSION >= 30101)}
uses
Classes, SysUtils, DB, rxdbgrid, LazFreeTypeFontCollection, vclutils, fpPDF;
Classes, SysUtils, DB, rxdbgrid, LazFreeTypeFontCollection, vclutils, Graphics, fpPDF, EasyLazFreeType;
type
@ -82,6 +82,7 @@ type
FOptions: TRxDBGridExportPdfOptions;
FProducerPDF: string;
FPdfOptions:TPdfExportOptions;
FCurPage: TPDFPage;
FWorkPages:TFPList;
FWorkPagesNeedCount:integer;
@ -99,7 +100,10 @@ type
FHeaderFont:integer;
FBodyFont:integer;
FFooterFont:integer;
FExportFontHeader: TFreeTypeFont;
FExportFontBody: TFreeTypeFont;
procedure WriteTextRect(AExportFont:TFreeTypeFont; X, Y, W, H:integer; AText:string; ATextAlign:TAlignment);
procedure DoExportTitle;
procedure DoExportBody;
procedure DoSetupFonts;
@ -129,7 +133,14 @@ type
implementation
{$IF (FPC_FULLVERSION >= 30101)}
uses rxdconst, FileUtil, forms, LCLIntf, LazFileUtils, EasyLazFreeType;
uses Grids, rxdconst, FileUtil, Forms, Controls, LCLIntf, LazFileUtils, RxDBGridExportPdfSetupUnit;
function ColorToDdfColor(C:TColor):TARGBColor;
var
A:array [1..4] of byte absolute C;
begin
Result:={A[1] shl 24 +} A[1] shl 16 + A[2] shl 8 + A[3];
end;
{ TPdfExportOptions }
@ -170,19 +181,50 @@ begin
FPdfOptions.Assign(AValue);
end;
procedure TRxDBGridExportPDF.WriteTextRect(AExportFont: TFreeTypeFont; X, Y, W,
H: integer; AText: string; ATextAlign: TAlignment);
var
FTW, FTH: Single;
X1: TPDFFloat;
Y1: TPDFFloat;
begin
FTW:=AExportFont.TextWidth(AText);
FTH:=AExportFont.TextHeight(AText);
case ATextAlign of
taLeftJustify:
begin
Y1:=Y;
X1:=X + constCellPadding;
end;
taRightJustify:
begin
Y1:=Y;
X1:=X + W - FTW - 2;
if X1 < X then
X1:=X;
end;
taCenter:
begin
Y1:=Y;
X1:=(X + W) / 2 - FTW / 2 - constCellPadding;
if X1 < X then
X1:=X;
end;
end;
FCurPage.WriteText(X1, Y1 - FTH, AText);
end;
procedure TRxDBGridExportPDF.DoExportTitle;
var
P: TPDFPage;
Pt: TPDFCoord;
i, X, CP, PX: Integer;
i, X, CP: Integer;
C: TRxColumn;
S: String;
PU: TPDFUnitOfMeasure;
WW: Single;
begin
X:=FPageWidth + FPageMargin.Right;
CP:=-1;
PX:=0;
FCurPage:=nil;
for i:=0 to FRxDBGrid.Columns.Count - 1 do
begin
C:=FRxDBGrid.Columns[i];
@ -190,19 +232,18 @@ begin
if X + C.Width > FPageWidth - FPageMargin.Right then
begin
Inc(CP);
P:=TPDFPage(FWorkPages[CP]);
FCurPage:=TPDFPage(FWorkPages[CP]);
X:=FPageMargin.Left;
PX:=0;
end;
Pt.X := X;
Pt.Y := FPosY;
P.SetColor(C.Color);
P.DrawRect(Pt.X, Pt.Y, C.Width, FRxDBGrid.DefaultRowHeight, 1, false, true);
FCurPage.SetColor(ColorToDdfColor(FRxDBGrid.BorderColor), true);
FCurPage.DrawRect(X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, 1, false, true);
P.SetFont(FHeaderFont, 10);
P.WriteText(Pt.X+2, Pt.Y-10, C.Title.Caption);
FCurPage.SetFont(FHeaderFont, 10);
FExportFontHeader.SizeInPoints:=10;
FCurPage.SetColor(ColorToDdfColor(C.Title.Font.Color), false);
WriteTextRect(FExportFontHeader, X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, C.Title.Caption, C.Title.Alignment);
X:=X + C.Width;
end;
@ -213,41 +254,38 @@ end;
procedure TRxDBGridExportPDF.DoExportBody;
procedure DoWriteRow;
var
P: TPDFPage;
Pt: TPDFCoord;
i, X, CP: Integer;
C: TRxColumn;
S: String;
begin
X:=FPageMargin.Left;
CP:=0;
P:=TPDFPage(FWorkPages[CP]);
X:=FPageWidth + FPageMargin.Right;
CP:=-1;
FCurPage:=nil;
for i:=0 to FRxDBGrid.Columns.Count - 1 do
begin
C:=FRxDBGrid.Columns[i];
Pt.X := X;
Pt.Y := FPosY;
P.SetColor(C.Color);
P.DrawRect(Pt.X, Pt.Y, C.Width, FRxDBGrid.DefaultRowHeight, 1, false, true);
if Assigned(C.Field) then
begin
P.SetFont(FBodyFont, 10);
P.WriteText(Pt.X+2, Pt.Y-10, C.Field.DisplayText);
end;
if X + C.Width > FPageWidth - FPageMargin.Right then
begin
Inc(CP);
P:=TPDFPage(FWorkPages[CP]);
FCurPage:=TPDFPage(FWorkPages[CP]);
X:=FPageMargin.Left;
end
else
Inc(X, C.Width);
end;
FCurPage.SetColor(ColorToDdfColor(FRxDBGrid.BorderColor), true); //Border
//FCurPage.SetColor(ColorToDdfColor(C.Color), false); // Fill color
FCurPage.DrawRect(X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, 1, false, true);
if Assigned(C.Field) then
begin
FCurPage.SetFont(FBodyFont, 10);
FExportFontBody.SizeInPoints:=10;
FCurPage.SetColor(ColorToDdfColor(C.Font.Color), false);
WriteTextRect(FExportFontBody, X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, C.Field.DisplayText, C.Alignment);
end;
X:=X + C.Width;
end;
end;
@ -269,26 +307,34 @@ procedure TRxDBGridExportPDF.DoSetupFonts;
var
FM: TCustomFamilyCollectionItem;
FIH, FI: TCustomFontCollectionItem;
B: Boolean;
begin
FExportFontHeader:=nil;
FFontCollection:=TFreeTypeFontCollection.Create;
InitFonts(FFontCollection);
FM:=FFontCollection.Family['Liberation Sans'];
if not Assigned(FM) then
FM:=FFontCollection.Family['Arial'];
if Assigned(FM) then
begin
FIH:=FM.GetFont(['Bold']);
FIH:=FM.GetFont('Bold');
if Assigned(FIH) then
begin
B:=FIH.Bold;
FPDFDocument.FontDirectory := ExtractFileDir(FIH.Filename);
FHeaderFont := FPDFDocument.AddFont(ExtractFileName(FIH.Filename), FIH.Information[ftiFullName]);
FExportFontHeader:=FIH.CreateFont;
end;
FI:=FM.GetFont('Regular');
if Assigned(FI) then
begin
FPDFDocument.FontDirectory := ExtractFileDir(FIH.Filename);
FBodyFont := FPDFDocument.AddFont(ExtractFileName(FIH.Filename), FIH.Information[ftiFullName]);
B:=FI.Bold;
FPDFDocument.FontDirectory := ExtractFileDir(FI.Filename);
FBodyFont := FPDFDocument.AddFont(ExtractFileName(FI.Filename), FI.Information[ftiFullName]);
FExportFontBody:=FI.CreateFont;
end;
if not Assigned(FIH) then
@ -299,7 +345,7 @@ begin
FFontCollection.Free;
if not Assigned(FM) then
raise Exception.Create('Not found arial font');
raise Exception.Create('Not found Sans font');
end;
procedure TRxDBGridExportPDF.DoExportFooter;
@ -310,6 +356,7 @@ end;
procedure TRxDBGridExportPDF.DoSetupDocHeader;
var
W, i: Integer;
C: TRxColumn;
begin
FPDFDocument.Infos.Title := Application.Title;
FPDFDocument.Infos.Author := FAuthorPDF;
@ -335,16 +382,17 @@ begin
FPageHeight := PDFPaperSizes[FPdfOptions.FPaperType, 1];
end;
W:=FPageMargin.Left;
for i:=0 to FRxDBGrid.Columns.Count-1 do
W:=FPageWidth + FPageMargin.Right;
FWorkPagesNeedCount:=0;
for i:=0 to FRxDBGrid.Columns.Count - 1 do
begin
W:=W + FRxDBGrid.Columns[i].Width;
if W > FPageWidth - FPageMargin.Right then
C:=FRxDBGrid.Columns[i];
if W + C.Width > FPageWidth - FPageMargin.Right then
begin
Inc(FWorkPagesNeedCount);
W:=FPageMargin.Left;
end;
W:=W + C.Width;
end;
end;
end;
@ -410,6 +458,9 @@ begin
FreeAndNil(FWorkPages);
FreeAndNil(FPDFDocument);
if Assigned(FExportFontHeader) then
FreeAndNil(FExportFontHeader);
end;
if Result and FOpenAfterExport then
@ -418,7 +469,22 @@ end;
function TRxDBGridExportPDF.DoSetupTools: boolean;
begin
Result:=inherited DoSetupTools;
RxDBGridExportPdfSetupForm:=TRxDBGridExportPdfSetupForm.Create(Application);
RxDBGridExportPdfSetupForm.FileNameEdit1.FileName:=FileName;
RxDBGridExportPdfSetupForm.cbOpenAfterExport.Checked:=FOpenAfterExport;
RxDBGridExportPdfSetupForm.cbExportColumnHeader.Checked:=repExportTitle in FOptions;
Result:=RxDBGridExportPdfSetupForm.ShowModal = mrOk;
if Result then
begin
FileName:=RxDBGridExportPdfSetupForm.FileNameEdit1.FileName;
FOpenAfterExport:=RxDBGridExportPdfSetupForm.cbOpenAfterExport.Checked;
if RxDBGridExportPdfSetupForm.cbExportColumnHeader.Checked then
FOptions:=FOptions + [repExportTitle]
else
FOptions:=FOptions - [repExportTitle];
end;
RxDBGridExportPdfSetupForm.Free;
end;
procedure TRxDBGridExportPDF.DoSaveDocument;

View File

@ -0,0 +1,132 @@
object RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm
Left = 544
Height = 254
Top = 387
Width = 518
Caption = 'Export params'
ClientHeight = 254
ClientWidth = 518
OnCreate = FormCreate
LCLVersion = '1.7'
object Label1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
Left = 6
Height = 20
Top = 6
Width = 105
BorderSpacing.Around = 6
Caption = 'Export file name'
FocusControl = FileNameEdit1
ParentColor = False
end
object FileNameEdit1: TFileNameEdit
AnchorSideLeft.Control = Label1
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 12
Height = 37
Top = 32
Width = 500
Filter = 'All files (*.*)|*.*|LibreOffice/OpenOffice (*.ods)|*.ods|Excell 97-2003|*.xls|Excell 2007-2013|*.xlxs'
FilterIndex = 0
HideDirectories = False
ButtonWidth = 23
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
MaxLength = 0
TabOrder = 0
end
object cbOpenAfterExport: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = FileNameEdit1
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 75
Width = 141
BorderSpacing.Around = 6
Caption = 'Open after export'
TabOrder = 1
end
object cbExportColumnHeader: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = cbOpenAfterExport
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 105
Width = 167
BorderSpacing.Around = 6
Caption = 'Export column header'
TabOrder = 2
end
object cbExportColumnFooter: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = cbExportColumnHeader
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 135
Width = 162
BorderSpacing.Around = 6
Caption = 'Export column footer'
Enabled = False
TabOrder = 3
end
object cbExportCellColors: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = cbExportColumnFooter
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 165
Width = 138
BorderSpacing.Around = 6
Caption = 'Export cell colors'
Enabled = False
TabOrder = 4
end
object cbOverwriteExisting: TCheckBox
AnchorSideLeft.Control = Label4
AnchorSideTop.Control = FileNameEdit1
AnchorSideTop.Side = asrBottom
Left = 265
Height = 24
Top = 75
Width = 168
BorderSpacing.Around = 6
Caption = 'Overwrite existing file'
Enabled = False
TabOrder = 5
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 46
Top = 202
Width = 506
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 6
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object Label4: TLabel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
Left = 259
Height = 1
Top = 0
Width = 1
ParentColor = False
end
end

View File

@ -0,0 +1,87 @@
{ TPdfExportOptions unit
Copyright (C) 2005-2013 Lagunov Aleksey alexs@yandex.ru
original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version with the following modification:
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,and
to copy and distribute the resulting executable under terms of your choice,
provided that you also meet, for each linked independent module, the terms
and conditions of the license of that module. An independent module is a
module which is not derived from or based on this library. If you modify
this library, you may extend this exception to your version of the library,
but you are not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
for more details.
You should have received a copy of the GNU Library General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
unit RxDBGridExportPdfSetupUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
EditBtn, ButtonPanel;
type
{ TRxDBGridExportPdfSetupForm }
TRxDBGridExportPdfSetupForm = class(TForm)
ButtonPanel1: TButtonPanel;
cbExportCellColors: TCheckBox;
cbExportColumnFooter: TCheckBox;
cbExportColumnHeader: TCheckBox;
cbOpenAfterExport: TCheckBox;
cbOverwriteExisting: TCheckBox;
FileNameEdit1: TFileNameEdit;
Label1: TLabel;
Label4: TLabel;
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
RxDBGridExportPdfSetupForm: TRxDBGridExportPdfSetupForm;
implementation
uses rxdconst;
{$R *.lfm}
{ TRxDBGridExportPdfSetupForm }
procedure TRxDBGridExportPdfSetupForm.FormCreate(Sender: TObject);
begin
Caption:=sExportParams;
Label1.Caption:=sExportFileName;
//Label3.Caption:=sPageName;
cbOpenAfterExport.Caption:=sOpenAfterExport;
cbExportColumnHeader.Caption:=sExportColumnHeader;
cbExportColumnFooter.Caption:=sExportColumnFooter;
cbExportCellColors.Caption:=sExportCellColors;
cbOverwriteExisting.Caption:=sOverwriteExisting;
//cbExportFormula.Caption:=sExportFormula;
end;
end.

View File

@ -15,7 +15,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
Left = 6
Height = 20
Top = 6
Width = 106
Width = 105
BorderSpacing.Around = 6
Caption = 'Export file name'
FocusControl = FileNameEdit1
@ -28,7 +28,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 12
Height = 30
Height = 37
Top = 32
Width = 530
Filter = 'All files (*.*)|*.*|LibreOffice/OpenOffice (*.ods)|*.ods|Excell 97-2003|*.xls|Excell 2007-2013|*.xlxs'
@ -39,6 +39,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
MaxLength = 0
Spacing = 0
TabOrder = 0
end
object Label3: TLabel
@ -47,7 +48,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 20
Top = 128
Top = 135
Width = 71
BorderSpacing.Around = 6
Caption = 'Page name'
@ -61,8 +62,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 286
Height = 30
Top = 154
Height = 37
Top = 161
Width = 256
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
@ -74,7 +75,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 128
Top = 135
Width = 162
BorderSpacing.Around = 6
Caption = 'Export column footer'
@ -86,7 +87,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 68
Top = 75
Width = 141
BorderSpacing.Around = 6
Caption = 'Open after export'
@ -94,8 +95,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 42
Top = 198
Height = 46
Top = 194
Width = 536
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
@ -114,8 +115,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 98
Width = 166
Top = 105
Width = 167
BorderSpacing.Around = 6
Caption = 'Export column header'
TabOrder = 2
@ -126,8 +127,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 158
Width = 137
Top = 165
Width = 138
BorderSpacing.Around = 6
Caption = 'Export cell colors'
TabOrder = 4
@ -148,7 +149,7 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 24
Top = 98
Top = 105
Width = 168
BorderSpacing.Around = 6
Caption = 'Overwrite existing file'
@ -160,8 +161,8 @@ object RxDBGridExportSpreadSheet_ParamsForm: TRxDBGridExportSpreadSheet_ParamsFo
AnchorSideTop.Side = asrBottom
Left = 280
Height = 24
Top = 68
Width = 120
Top = 75
Width = 121
BorderSpacing.Around = 6
Caption = 'Export formula'
TabOrder = 5

View File

@ -26,7 +26,7 @@ translate to Lazarus by alexs in 2005 - 2016
"/>
<License Value="LGPL"/>
<Version Major="2" Minor="9" Release="3" Build="192"/>
<Files Count="68">
<Files Count="70">
<Item1>
<Filename Value="autopanel.pas"/>
<UnitName Value="AutoPanel"/>
@ -302,6 +302,14 @@ translate to Lazarus by alexs in 2005 - 2016
<Filename Value="rxdbgridexportpdf.pas"/>
<UnitName Value="RxDBGridExportPdf"/>
</Item68>
<Item69>
<Filename Value="rxdbgridexportpdfsetupunit.lfm"/>
<Type Value="LFM"/>
</Item69>
<Item70>
<Filename Value="rxdbgridexportpdfsetupunit.pas"/>
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
</Item70>
</Files>
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
<i18n>

View File

@ -20,7 +20,7 @@ uses
ex_rx_bin_datapacket, ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby,
RxMDI, RxIniPropStorage, rxDateRangeEditUnit, RxDBGridFooterTools,
rxdbgridfootertools_setup, rxShortCutUnit, RxDBGridExportPdf,
LazarusPackageIntf;
RxDBGridExportPdfSetupUnit, LazarusPackageIntf;
implementation