LazReport, updated editor sample layout and added master-detail report sample

git-svn-id: trunk@27297 -
This commit is contained in:
jesus 2010-09-10 21:04:37 +00:00
parent e6486c22dc
commit dcdc584212
19 changed files with 1187 additions and 211 deletions

1
.gitattributes vendored
View File

@ -1364,6 +1364,7 @@ components/lazreport/samples/editor/languages/calleditorwithpkg.po svneol=native
components/lazreport/samples/editor/languages/calleditorwithpkg.ru.po svneol=native#text/plain components/lazreport/samples/editor/languages/calleditorwithpkg.ru.po svneol=native#text/plain
components/lazreport/samples/editor/maincalleditor.lfm svneol=native#text/plain components/lazreport/samples/editor/maincalleditor.lfm svneol=native#text/plain
components/lazreport/samples/editor/maincalleditor.pas svneol=native#text/pascal components/lazreport/samples/editor/maincalleditor.pas svneol=native#text/pascal
components/lazreport/samples/editor/masterdetail.lrf svneol=LF#text/xml eol=lf
components/lazreport/samples/editor/readme.txt svneol=native#text/plain components/lazreport/samples/editor/readme.txt svneol=native#text/plain
components/lazreport/samples/editor/rpta.lrf svneol=LF#text/xml eol=lf components/lazreport/samples/editor/rpta.lrf svneol=LF#text/xml eol=lf
components/lazreport/samples/editor/rptb.lrf svneol=LF#text/xml eol=lf components/lazreport/samples/editor/rptb.lrf svneol=LF#text/xml eol=lf

View File

@ -14,7 +14,7 @@
<Pages> <Pages>
<PrintToDefault Value="False"/> <PrintToDefault Value="False"/>
<DoublePass Value="False"/> <DoublePass Value="False"/>
<SelectedPrinter Value="Microsoft Office Document Image Writer"/> <SelectedPrinter Value="LaserJet1100"/>
<PageCount Value="1"/> <PageCount Value="1"/>
<Page1> <Page1>
<Name Value="Page1"/> <Name Value="Page1"/>
@ -45,7 +45,7 @@
<Size> <Size>
<Left Value="0"/> <Left Value="0"/>
<Top Value="68"/> <Top Value="68"/>
<Width Value="753"/> <Width Value="773"/>
<Height Value="32"/> <Height Value="32"/>
</Size> </Size>
<Flags Value="112"/> <Flags Value="112"/>
@ -53,11 +53,11 @@
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<BandType Value="btGroupHeader"/> <BandType Value="btGroupHeader"/>
<Condition Value="Dbf1.&quot;COUNTRY1&quot;"/> <Condition Value="Detail.&quot;COUNTRY1&quot;"/>
<DatasetStr Value=""/> <DatasetStr Value=""/>
</Object1> </Object1>
<Object2> <Object2>
<Name Value="MasterData1"/> <Name Value="bndDetail"/>
<ClassName Value="TfrBandView"/> <ClassName Value="TfrBandView"/>
<Visible Value="1"/> <Visible Value="1"/>
<Typ Value="gtBand"/> <Typ Value="gtBand"/>
@ -65,7 +65,7 @@
<Size> <Size>
<Left Value="0"/> <Left Value="0"/>
<Top Value="192"/> <Top Value="192"/>
<Width Value="753"/> <Width Value="773"/>
<Height Value="17"/> <Height Value="17"/>
</Size> </Size>
<Flags Value="48"/> <Flags Value="48"/>
@ -74,7 +74,7 @@
</Data> </Data>
<BandType Value="btMasterData"/> <BandType Value="btMasterData"/>
<Condition Value=""/> <Condition Value=""/>
<DatasetStr Value="frDBDataSet1"/> <DatasetStr Value="frDbDetail"/>
</Object2> </Object2>
<Object3> <Object3>
<Name Value="GroupFooter1"/> <Name Value="GroupFooter1"/>
@ -85,7 +85,7 @@
<Size> <Size>
<Left Value="0"/> <Left Value="0"/>
<Top Value="304"/> <Top Value="304"/>
<Width Value="753"/> <Width Value="773"/>
<Height Value="60"/> <Height Value="60"/>
</Size> </Size>
<Flags Value="48"/> <Flags Value="48"/>
@ -105,7 +105,7 @@
<Size> <Size>
<Left Value="0"/> <Left Value="0"/>
<Top Value="128"/> <Top Value="128"/>
<Width Value="753"/> <Width Value="773"/>
<Height Value="28"/> <Height Value="28"/>
</Size> </Size>
<Flags Value="48"/> <Flags Value="48"/>
@ -139,7 +139,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;COUNTRY1&quot;]&#xD;&#xA;"/> <Memo Value="[Detail.&quot;COUNTRY1&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -182,7 +182,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;AUTHOR&quot;]&#xD;&#xA;"/> <Memo Value="[Detail.&quot;AUTHOR&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -225,7 +225,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;TITLE&quot;]&#xD;&#xA;"/> <Memo Value="[Detail.&quot;TITLE&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -268,7 +268,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;COMPANY1&quot;]&#xD;&#xA;"/> <Memo Value="[Detail.&quot;COMPANY1&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -311,7 +311,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;YEAR&quot;]&#xD;&#xA;"/> <Memo Value="[Detail.&quot;YEAR&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -354,7 +354,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[COUNT(MasterData1)] Albums -> $[SUM([Dbf1.&quot;PRICE&quot;]*[Dbf1.&quot;QTY&quot;], masterdata1) #N#,###.00]&#xD;&#xA;&#x9;&#xD;&#xA;"/> <Memo Value="[COUNT(bndDetail)] Albums -> $[SUM([Detail.&quot;PRICE&quot;]*[Detail.&quot;QTY&quot;], bndDetail) #N#,###.00]&#xA;&#x9;&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -397,7 +397,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;QTY&quot;]&#xD;&#xA;"/> <Memo Value="[Detail.&quot;QTY&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -440,7 +440,7 @@
<Data> <Data>
<Format Value="17039918"/> <Format Value="17039918"/>
<FormatStr Value="$#,###.00"/> <FormatStr Value="$#,###.00"/>
<Memo Value="[Dbf1.&quot;PRICE&quot;]&#xD;&#xA;"/> <Memo Value="[Detail.&quot;PRICE&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -502,7 +502,7 @@
<Data> <Data>
<Format Value="17039918"/> <Format Value="17039918"/>
<FormatStr Value="$#,###.00"/> <FormatStr Value="$#,###.00"/>
<Memo Value="[[Dbf1.&quot;QTY&quot;]*[Dbf1.&quot;PRICE&quot;]]&#xD;&#xA;"/> <Memo Value="[[Detail.&quot;QTY&quot;]*[Detail.&quot;PRICE&quot;]]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -545,7 +545,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="Year&#xD;&#xA;"/> <Memo Value="Year&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -588,7 +588,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="Author&#xD;&#xA;"/> <Memo Value="Author&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -631,7 +631,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="Title&#xD;&#xA;"/> <Memo Value="Title&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -674,7 +674,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="Company&#xD;&#xA;"/> <Memo Value="Company&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -717,7 +717,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="Qty&#xD;&#xA;"/> <Memo Value="Qty&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -760,7 +760,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="Price&#xD;&#xA;"/> <Memo Value="Price&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -803,7 +803,7 @@
<Data> <Data>
<Format Value="558"/> <Format Value="558"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="Subtotal&#xD;&#xA;"/> <Memo Value="Subtotal&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>

View File

@ -7,7 +7,7 @@ uses
Forms, Forms,
maincalleditor, maincalleditor,
lazreportpdfexport, lazreportpdfexport,
lazreport, custompreview; lazreport;
{$R calleditorwithpkg.res} {$R calleditorwithpkg.res}

View File

@ -185,6 +185,10 @@ msgctxt "TFRMMAIN.ACCTHUMBNAILS.CAPTION"
msgid "Thumbnails" msgid "Thumbnails"
msgstr "Vorschaubilder" msgstr "Vorschaubilder"
#: TFRMMAIN.BTNMASTERDETAIL.CAPTION
msgid "Master-Detail Test"
msgstr ""
#: TFRMMAIN.FRMMAIN.CAPTION #: TFRMMAIN.FRMMAIN.CAPTION
msgctxt "TFRMMAIN.FRMMAIN.CAPTION" msgctxt "TFRMMAIN.FRMMAIN.CAPTION"
msgid "LazReport Test Suite" msgid "LazReport Test Suite"

View File

@ -182,6 +182,10 @@ msgctxt "TFRMMAIN.ACCTHUMBNAILS.CAPTION"
msgid "Thumbnails" msgid "Thumbnails"
msgstr "Imágenes" msgstr "Imágenes"
#: TFRMMAIN.BTNMASTERDETAIL.CAPTION
msgid "Master-Detail Test"
msgstr ""
#: TFRMMAIN.FRMMAIN.CAPTION #: TFRMMAIN.FRMMAIN.CAPTION
msgctxt "TFRMMAIN.FRMMAIN.CAPTION" msgctxt "TFRMMAIN.FRMMAIN.CAPTION"
msgid "LazReport Test Suite" msgid "LazReport Test Suite"

View File

@ -186,6 +186,10 @@ msgctxt "TFRMMAIN.ACCTHUMBNAILS.CAPTION"
msgid "Thumbnails" msgid "Thumbnails"
msgstr "Vignettes" msgstr "Vignettes"
#: TFRMMAIN.BTNMASTERDETAIL.CAPTION
msgid "Master-Detail Test"
msgstr ""
#: TFRMMAIN.FRMMAIN.CAPTION #: TFRMMAIN.FRMMAIN.CAPTION
msgctxt "TFRMMAIN.FRMMAIN.CAPTION" msgctxt "TFRMMAIN.FRMMAIN.CAPTION"
msgid "LazReport Test Suite" msgid "LazReport Test Suite"

View File

@ -185,6 +185,10 @@ msgctxt "TFRMMAIN.ACCTHUMBNAILS.CAPTION"
msgid "Thumbnails" msgid "Thumbnails"
msgstr "Miniatiūros" msgstr "Miniatiūros"
#: TFRMMAIN.BTNMASTERDETAIL.CAPTION
msgid "Master-Detail Test"
msgstr ""
#: TFRMMAIN.FRMMAIN.CAPTION #: TFRMMAIN.FRMMAIN.CAPTION
msgctxt "TFRMMAIN.FRMMAIN.CAPTION" msgctxt "TFRMMAIN.FRMMAIN.CAPTION"
msgid "LazReport Test Suite" msgid "LazReport Test Suite"

View File

@ -182,6 +182,10 @@ msgctxt "TFRMMAIN.ACCTHUMBNAILS.CAPTION"
msgid "Thumbnails" msgid "Thumbnails"
msgstr "Miniaturas" msgstr "Miniaturas"
#: TFRMMAIN.BTNMASTERDETAIL.CAPTION
msgid "Master-Detail Test"
msgstr ""
#: TFRMMAIN.FRMMAIN.CAPTION #: TFRMMAIN.FRMMAIN.CAPTION
msgctxt "TFRMMAIN.FRMMAIN.CAPTION" msgctxt "TFRMMAIN.FRMMAIN.CAPTION"
msgid "LazReport Test Suite" msgid "LazReport Test Suite"

View File

@ -177,6 +177,10 @@ msgctxt "TFRMMAIN.ACCTHUMBNAILS.CAPTION"
msgid "Thumbnails" msgid "Thumbnails"
msgstr "" msgstr ""
#: TFRMMAIN.BTNMASTERDETAIL.CAPTION
msgid "Master-Detail Test"
msgstr ""
#: TFRMMAIN.FRMMAIN.CAPTION #: TFRMMAIN.FRMMAIN.CAPTION
msgctxt "TFRMMAIN.FRMMAIN.CAPTION" msgctxt "TFRMMAIN.FRMMAIN.CAPTION"
msgid "LazReport Test Suite" msgid "LazReport Test Suite"

View File

@ -182,6 +182,10 @@ msgctxt "TFRMMAIN.ACCTHUMBNAILS.CAPTION"
msgid "Thumbnails" msgid "Thumbnails"
msgstr "Эскизы" msgstr "Эскизы"
#: TFRMMAIN.BTNMASTERDETAIL.CAPTION
msgid "Master-Detail Test"
msgstr ""
#: TFRMMAIN.FRMMAIN.CAPTION #: TFRMMAIN.FRMMAIN.CAPTION
msgctxt "TFRMMAIN.FRMMAIN.CAPTION" msgctxt "TFRMMAIN.FRMMAIN.CAPTION"
msgid "LazReport Test Suite" msgid "LazReport Test Suite"

View File

@ -1,10 +1,11 @@
object frmMain: TfrmMain object frmMain: TfrmMain
Left = 157 Left = 98
Height = 545 Height = 545
Top = 100 Top = 111
Width = 828 Width = 828
ActiveControl = Panel1
Caption = 'LazReport Test Suite' Caption = 'LazReport Test Suite'
ClientHeight = 525 ClientHeight = 522
ClientWidth = 828 ClientWidth = 828
Menu = MainMenu1 Menu = MainMenu1
OnCreate = frmMainCreate OnCreate = frmMainCreate
@ -14,89 +15,31 @@ object frmMain: TfrmMain
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = grid AnchorSideBottom.Control = grid
Left = 6 Left = 6
Height = 14 Height = 16
Top = 44 Top = 103
Width = 29 Width = 35
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Index' Caption = 'Index'
ParentColor = False ParentColor = False
end end
object lblExpr: TLabel object lblExpr: TLabel
AnchorSideRight.Control = btnComposite AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = grid AnchorSideBottom.Control = grid
Left = 602 Left = 752
Height = 14 Height = 16
Top = 44 Top = 103
Width = 53 Width = 70
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Expression' Caption = 'Expression'
ParentColor = False ParentColor = False
end end
object btnCallEditor: TButton
AnchorSideTop.Control = Owner
AnchorSideRight.Control = btnOpenReport
Left = 287
Height = 23
Top = 6
Width = 83
Action = accNewReport
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 0
end
object grid: TDBGrid
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = btnComposite
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideBottom.Control = sbar
Left = 0
Height = 438
Top = 64
Width = 828
Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom]
Color = clWhite
Columns = <>
DataSource = srcDetail
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
TabOrder = 5
OnTitleClick = gridTitleClick
end
object btnPrintGrid: TButton
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 752
Height = 23
Top = 6
Width = 70
Action = accPrintGrid
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 1
end
object btnPreviewReport: TButton
AnchorSideTop.Control = Owner
AnchorSideRight.Control = btnPrintReport
Left = 556
Height = 23
Top = 6
Width = 100
Action = accPreviewReport
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 2
end
object sbar: TStatusBar object sbar: TStatusBar
Left = 0 Left = 0
Height = 23 Height = 17
Top = 502 Top = 505
Width = 828 Width = 828
Panels = < Panels = <
item item
@ -104,104 +47,181 @@ object frmMain: TfrmMain
end> end>
SimplePanel = False SimplePanel = False
end end
object btnEditReport: TButton
AnchorSideTop.Control = Owner
AnchorSideRight.Control = btnPreviewReport
Left = 470
Height = 23
Top = 6
Width = 80
Action = accEditReport
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 3
end
object btnPrintReport: TButton
AnchorSideTop.Control = Owner
AnchorSideRight.Control = btnPrintGrid
Left = 662
Height = 23
Top = 6
Width = 84
Action = accPrintReport
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 4
end
object btnOpenReport: TButton
AnchorSideTop.Control = Owner
AnchorSideRight.Control = btnEditReport
Left = 376
Height = 23
Top = 6
Width = 88
Action = accOpenReport
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 6
end
object comboIndex: TComboBox object comboIndex: TComboBox
AnchorSideLeft.Control = lblIndex AnchorSideLeft.Control = lblIndex
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = lblExpr AnchorSideRight.Control = lblExpr
AnchorSideBottom.Control = grid AnchorSideBottom.Control = grid
Left = 41 Left = 47
Height = 21 Height = 29
Top = 37 Top = 90
Width = 555 Width = 699
Anchors = [akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 13 ItemHeight = 0
OnSelect = comboIndexSelect OnSelect = comboIndexSelect
TabOrder = 8 TabOrder = 2
end end
object btnImageList: TButton object mastergrid: TDBGrid
AnchorSideTop.Control = btnPrintGrid AnchorSideLeft.Control = Owner
AnchorSideTop.Control = comboIndex
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = grid
AnchorSideBottom.Control = sbar
Left = 0
Height = 380
Top = 125
Width = 204
Anchors = [akTop, akLeft, akBottom]
Color = clMoneyGreen
Columns = <>
DataSource = srcMaster
TabOrder = 3
Visible = False
end
object grid: TDBGrid
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = comboIndex
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 743 AnchorSideBottom.Control = sbar
Height = 23 Left = 0
Top = 35 Height = 380
Width = 79 Top = 125
Action = accThumbnails Width = 828
Anchors = [akTop, akRight] Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = True Color = clWhite
BorderSpacing.Around = 6 Columns = <>
TabOrder = 9 DataSource = srcDetail
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
TabOrder = 0
OnTitleClick = gridTitleClick
end end
object btnComposite: TButton object Panel1: TPanel
AnchorSideTop.Control = btnPrintReport Left = 0
AnchorSideTop.Side = asrBottom Height = 84
AnchorSideRight.Control = btnImageList Top = 0
Left = 661 Width = 828
Height = 23 Align = alTop
Top = 35 BevelOuter = bvNone
Width = 76 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
Action = accComposite ChildSizing.EnlargeVertical = crsHomogenousChildResize
Anchors = [akTop, akRight] ChildSizing.Layout = cclLeftToRightThenTopToBottom
AutoSize = True ChildSizing.ControlsPerLine = 5
BorderSpacing.Around = 6 ClientHeight = 84
TabOrder = 10 ClientWidth = 828
end TabOrder = 4
object btnCustomPreview: TButton object btnNewReport: TButton
AnchorSideTop.Control = Owner Left = 6
AnchorSideRight.Control = btnCallEditor Height = 33
Left = 178 Top = 6
Height = 23 Width = 169
Top = 6 Action = accNewReport
Width = 103 AutoSize = True
Action = accCustomPreview BorderSpacing.Around = 6
Anchors = [akTop, akRight] TabOrder = 0
AutoSize = True end
BorderSpacing.Around = 6 object btnOpenReport: TButton
TabOrder = 11 Left = 181
Height = 33
Top = 6
Width = 146
Action = accOpenReport
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 2
end
object btnEditReport: TButton
Left = 333
Height = 33
Top = 6
Width = 136
Action = accEditReport
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 3
end
object btnPreviewReport: TButton
Left = 475
Height = 33
Top = 6
Width = 160
Action = accPreviewReport
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 4
end
object btnPrintReport: TButton
Left = 641
Height = 33
Top = 6
Width = 181
Action = accPrintReport
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 5
end
object btnCustomPreview: TButton
Left = 6
Height = 33
Top = 45
Width = 169
Action = accCustomPreview
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 1
end
object btnPrintGrid: TButton
AnchorSideRight.Side = asrBottom
Left = 181
Height = 33
Top = 45
Width = 146
Action = accPrintGrid
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 6
end
object btnComposite: TButton
AnchorSideTop.Side = asrBottom
Left = 333
Height = 33
Top = 45
Width = 136
Action = accComposite
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 8
end
object btnImageList: TButton
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 475
Height = 33
Top = 45
Width = 160
Action = accThumbnails
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 7
end
object btnMasterDetail: TToggleBox
Left = 641
Height = 33
Top = 45
Width = 181
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Master-Detail Test'
OnClick = btnMasterDetailClick
TabOrder = 9
end
end end
object TheReport: TfrReport object TheReport: TfrReport
Dataset = frDBDataSet1 Dataset = frDbDetail
InitialZoom = pzDefault InitialZoom = pzDefault
Options = [] Options = []
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbHelp, pbExit] PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbHelp, pbExit]
@ -369,7 +389,7 @@ object frmMain: TfrmMain
left = 184 left = 184
top = 248 top = 248
end end
object frDBDataSet1: TfrDBDataSet object frDbDetail: TfrDBDataSet
DataSet = Detail DataSet = Detail
left = 112 left = 112
top = 192 top = 192
@ -446,8 +466,8 @@ object frmMain: TfrmMain
object ApplicationProperties1: TApplicationProperties object ApplicationProperties1: TApplicationProperties
HintPause = 10 HintPause = 10
OnShowHint = ApplicationProperties1ShowHint OnShowHint = ApplicationProperties1ShowHint
left = 520 left = 500
top = 152 top = 160
end end
object ActionList1: TActionList object ActionList1: TActionList
left = 48 left = 48
@ -526,8 +546,8 @@ object frmMain: TfrmMain
object OpenDialog1: TOpenDialog object OpenDialog1: TOpenDialog
Filter = 'LazReport Files|*.lrf|FreeReport Files|*.frf|All Files|*.*' Filter = 'LazReport Files|*.lrf|FreeReport Files|*.frf|All Files|*.*'
FilterIndex = 0 FilterIndex = 0
left = 520 left = 572
top = 88 top = 160
end end
object frCSVExport1: TfrCSVExport object frCSVExport1: TfrCSVExport
left = 352 left = 352
@ -574,16 +594,28 @@ object frmMain: TfrmMain
top = 72 top = 72
end end
object LookCompanies: TDbf object LookCompanies: TDbf
IndexDefs = < IndexDefs = <>
item
IndexFile = 'BYCOMPANY'
SortField = 'COMPANY'
Options = [ixExpression]
end>
TableName = 'companies.dbf' TableName = 'companies.dbf'
TableLevel = 3 TableLevel = 3
FilterOptions = [] FilterOptions = []
left = 184 left = 184
top = 128 top = 128
end end
object master: TDbf
IndexDefs = <>
TableLevel = 4
FilterOptions = []
left = 184
top = 312
end
object srcMaster: TDatasource
DataSet = master
left = 184
top = 368
end
object frDbMaster: TfrDBDataSet
DataSet = master
left = 112
top = 312
end
end end

View File

@ -30,7 +30,7 @@ uses
Buttons, StdCtrls, LR_Const, LR_Class, LR_Desgn, Dbf, DB, DBGrids, LR_DBSet, Buttons, StdCtrls, LR_Const, LR_Class, LR_Desgn, Dbf, DB, DBGrids, LR_DBSet,
LR_PGrid, Menus, ComCtrls, ActnList, Lr_e_txt, Lr_e_htm, LR_E_CSV, LR_DSet, LR_PGrid, Menus, ComCtrls, ActnList, Lr_e_txt, Lr_e_htm, LR_E_CSV, LR_DSet,
LR_BarC, LR_RRect, LR_Shape, LR_ChBox, lr_e_pdf, lconvencoding, lr_e_gen, LR_BarC, LR_RRect, LR_Shape, LR_ChBox, lr_e_pdf, lconvencoding, lr_e_gen,
lr_utils, LCLProc, custompreview; lr_utils, LCLProc, ExtCtrls, custompreview;
type type
@ -53,7 +53,8 @@ type
accCustomPreview: TAction; accCustomPreview: TAction;
ActionList1: TActionList; ActionList1: TActionList;
ApplicationProperties1: TApplicationProperties; ApplicationProperties1: TApplicationProperties;
btnCallEditor: TButton; btnMasterDetail: TToggleBox;
btnNewReport: TButton;
btnCustomPreview: TButton; btnCustomPreview: TButton;
btnPrintGrid: TButton; btnPrintGrid: TButton;
btnPreviewReport: TButton; btnPreviewReport: TButton;
@ -63,6 +64,11 @@ type
btnImageList: TButton; btnImageList: TButton;
btnComposite: TButton; btnComposite: TButton;
comboIndex: TComboBox; comboIndex: TComboBox;
frDbMaster: TfrDBDataSet;
mastergrid: TDBGrid;
Panel1: TPanel;
srcMaster: TDatasource;
master: TDbf;
srcDetail: TDatasource; srcDetail: TDatasource;
DetailAUTHOR: TStringField; DetailAUTHOR: TStringField;
DetailCOMPANY1: TStringField; DetailCOMPANY1: TStringField;
@ -84,7 +90,7 @@ type
frCheckBoxObject1: TfrCheckBoxObject; frCheckBoxObject1: TfrCheckBoxObject;
Composite: TfrCompositeReport; Composite: TfrCompositeReport;
frCSVExport1: TfrCSVExport; frCSVExport1: TfrCSVExport;
frDBDataSet1: TfrDBDataSet; frDbDetail: TfrDBDataSet;
frRoundRectObject1: TfrRoundRectObject; frRoundRectObject1: TfrRoundRectObject;
frShapeObject1: TfrShapeObject; frShapeObject1: TfrShapeObject;
frUserDataset1: TfrUserDataset; frUserDataset1: TfrUserDataset;
@ -126,6 +132,7 @@ type
procedure accPreviewReportExecute(Sender: TObject); procedure accPreviewReportExecute(Sender: TObject);
procedure accPrintGridExecute(Sender: TObject); procedure accPrintGridExecute(Sender: TObject);
procedure accPrintReportExecute(Sender: TObject); procedure accPrintReportExecute(Sender: TObject);
procedure btnMasterDetailClick(Sender: TObject);
procedure comboIndexSelect(Sender: TObject); procedure comboIndexSelect(Sender: TObject);
procedure gridTitleClick(Column: TColumn); procedure gridTitleClick(Column: TColumn);
procedure frmMainCreate(Sender: TObject); procedure frmMainCreate(Sender: TObject);
@ -138,10 +145,12 @@ type
FImageList: TStringList; FImageList: TStringList;
FImageListIndex: Integer; FImageListIndex: Integer;
FObjCount: Integer; FObjCount: Integer;
FCountryIndex: Integer;
procedure UpdateAppTranslation; procedure UpdateAppTranslation;
procedure SetIndex(const aIndexName: string); procedure SetIndex(const aIndexName: string);
procedure OpenReport(const aFileName:string); procedure OpenReport(const aFileName:string);
procedure UpdateActiveReport; procedure UpdateActiveReport;
procedure MasterDetail;
public public
{ public declarations } { public declarations }
end; end;
@ -327,7 +336,15 @@ end;
procedure TfrmMain.accPreviewReportExecute(Sender: TObject); procedure TfrmMain.accPreviewReportExecute(Sender: TObject);
begin begin
if btnMasterDetail.Checked then begin
grid.DataSource := nil;
MasterGrid.Datasource := nil;
end;
TheReport.ShowReport; TheReport.ShowReport;
if btnMasterDetail.Checked then begin
MasterGrid.DataSource := srcMaster;
grid.Datasource := srcDetail;
end;
end; end;
procedure TfrmMain.accPrintGridExecute(Sender: TObject); procedure TfrmMain.accPrintGridExecute(Sender: TObject);
@ -343,6 +360,11 @@ begin
ShowMessage(cerPrepareFailed); ShowMessage(cerPrepareFailed);
end; end;
procedure TfrmMain.btnMasterDetailClick(Sender: TObject);
begin
MasterDetail;
end;
procedure TfrmMain.comboIndexSelect(Sender: TObject); procedure TfrmMain.comboIndexSelect(Sender: TObject);
var var
i: Integer; i: Integer;
@ -393,11 +415,15 @@ begin
Detail.FilePath := 'db/'; Detail.FilePath := 'db/';
Detail.TableName := 'disco.dbf'; Detail.TableName := 'disco.dbf';
Detail.open; Detail.open;
Master.Close;
Master.TableName := 'db/countries.dbf';
comboIndex.Clear; comboIndex.Clear;
comboIndex.Items.Add(cerNone); comboIndex.Items.Add(cerNone);
for i:=0 to Detail.Indexes.Count-1 do for i:=0 to Detail.Indexes.Count-1 do
comboIndex.Items.Add(Detail.Indexes[i].Name); comboIndex.Items.Add(Detail.Indexes[i].Name);
FCountryIndex := ComboIndex.Items.IndexOf('BYCOUNTRY');
SetIndex(''); SetIndex('');
if FileExistsUTF8(ExtractFilePath(ParamStrUTF8(0))+'salida.lrf') then if FileExistsUTF8(ExtractFilePath(ParamStrUTF8(0))+'salida.lrf') then
@ -476,6 +502,30 @@ begin
SBar.Panels[0].Text:= format(cerActiveReport, [TheReport.FileName]); SBar.Panels[0].Text:= format(cerActiveReport, [TheReport.FileName]);
end; end;
procedure TfrmMain.MasterDetail;
begin
if mastergrid.Visible then begin
MasterGrid.Visible := false;
Grid.AnchorSideLeft.Control := Self;
Grid.AnchorSideLeft.Side := asrTop;
detail.MasterSource := nil;
detail.MasterFields := '';
detail.IndexName := '';
comboIndexSelect(self);
comboIndex.Enabled := true;
end else begin
Master.Open;
detail.MasterSource := srcMaster;
detail.MasterFields := 'CountryID';
comboIndex.ItemIndex := FCountryIndex;
comboIndexSelect(self);
MasterGrid.Visible := true;
Grid.AnchorSideLeft.Control := MasterGrid;
Grid.AnchorSideLeft.Side := asrBottom;
comboIndex.Enabled := false;
end;
end;
procedure TranslateResStrings; procedure TranslateResStrings;
var var
Lang, FallbackLang: String; Lang, FallbackLang: String;

View File

@ -0,0 +1,852 @@
<?xml version="1.0"?>
<CONFIG>
<LazReport>
<Version Value="25"/>
<Title Value=""/>
<Subject Value=""/>
<KeyWords Value=""/>
<Comments Value=""/>
<ReportVersionBuild Value=""/>
<ReportVersionMajor Value=""/>
<ReportVersionMinor Value=""/>
<ReportVersionRelease Value=""/>
<ReportAutor Value=""/>
<Pages>
<PrintToDefault Value="False"/>
<DoublePass Value="True"/>
<SelectedPrinter Value="LaserJet1100"/>
<PageCount Value="1"/>
<Page1>
<Name Value="Page1"/>
<ClassName Value="TfrPageReport"/>
<Visible Value="1"/>
<Width Value="1"/>
<Height Value="1" PageType="0"/>
<PgSize Value="1"/>
<Margins>
<left Value="0"/>
<Top Value="0"/>
<Right Value="0"/>
<Bottom Value="0"/>
</Margins>
<Orientation Value="poPortrait"/>
<UseMargins Value="True"/>
<PrintToPrevPage Value="False"/>
<ColCount Value="1"/>
<ColGap Value="0"/>
<LayoutOrder Value="loColumns"/>
<ObjectCount Value="22"/>
<Object1>
<Name Value="DatosMaestros1"/>
<ClassName Value="TfrBandView"/>
<Visible Value="1"/>
<Typ Value="gtBand"/>
<StreamMode Value="0"/>
<Size>
<Left Value="0"/>
<Top Value="192"/>
<Width Value="773"/>
<Height Value="40"/>
</Size>
<Flags Value="48"/>
<Data>
<Script Value=""/>
</Data>
<BandType Value="btMasterData"/>
<Condition Value=""/>
<DatasetStr Value="frDbMaster"/>
</Object1>
<Object2>
<Name Value="bndDetail"/>
<ClassName Value="TfrBandView"/>
<Visible Value="1"/>
<Typ Value="gtBand"/>
<StreamMode Value="0"/>
<Size>
<Left Value="0"/>
<Top Value="316"/>
<Width Value="773"/>
<Height Value="16"/>
</Size>
<Flags Value="48"/>
<Data>
<Script Value=""/>
</Data>
<BandType Value="btDetailData"/>
<Condition Value=""/>
<DatasetStr Value="frDbDetail"/>
</Object2>
<Object3>
<Name Value="EncabezadoDe detalle1"/>
<ClassName Value="TfrBandView"/>
<Visible Value="1"/>
<Typ Value="gtBand"/>
<StreamMode Value="0"/>
<Size>
<Left Value="0"/>
<Top Value="268"/>
<Width Value="773"/>
<Height Value="24"/>
</Size>
<Flags Value="48"/>
<Data>
<Script Value=""/>
</Data>
<BandType Value="btDetailHeader"/>
<Condition Value=""/>
<DatasetStr Value=""/>
</Object3>
<Object4>
<Name Value="PieDe detalle1"/>
<ClassName Value="TfrBandView"/>
<Visible Value="1"/>
<Typ Value="gtBand"/>
<StreamMode Value="0"/>
<Size>
<Left Value="0"/>
<Top Value="372"/>
<Width Value="773"/>
<Height Value="28"/>
</Size>
<Flags Value="48"/>
<Data>
<Script Value=""/>
</Data>
<BandType Value="btDetailFooter"/>
<Condition Value=""/>
<DatasetStr Value=""/>
</Object4>
<Object5>
<Name Value="Memo1"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="32"/>
<Top Value="196"/>
<Width Value="704"/>
<Height Value="30"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value="frbBottom"/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="[Master.&quot;COUNTRY&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsBold"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlCenter"/>
<Angle Value="0"/>
</Object5>
<Object6>
<Name Value="Memo2"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="124"/>
<Top Value="316"/>
<Width Value="136"/>
<Height Value="17"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="[Detail.&quot;AUTHOR&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object6>
<Object7>
<Name Value="Memo3"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="264"/>
<Top Value="316"/>
<Width Value="200"/>
<Height Value="17"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="[Detail.&quot;TITLE&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object7>
<Object8>
<Name Value="Memo4"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="468"/>
<Top Value="316"/>
<Width Value="84"/>
<Height Value="17"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="[Detail.&quot;COMPANY1&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object8>
<Object9>
<Name Value="Memo5"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="64"/>
<Top Value="316"/>
<Width Value="52"/>
<Height Value="17"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="[Detail.&quot;YEAR&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object9>
<Object10>
<Name Value="Memo6"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="60"/>
<Top Value="376"/>
<Width Value="672"/>
<Height Value="20"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="[COUNT(bndDetail)] Albums -> $[SUM([Detail.&quot;PRICE&quot;]*[Detail.&quot;QTY&quot;], bndDetail) #N#,###.00]&#xA;&#x9;&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taRightJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object10>
<Object11>
<Name Value="Memo7"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="560"/>
<Top Value="316"/>
<Width Value="36"/>
<Height Value="17"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clWhite"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="3"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="[Detail.&quot;QTY&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object11>
<Object12>
<Name Value="Memo8"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="604"/>
<Top Value="316"/>
<Width Value="56"/>
<Height Value="17"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="17039918"/>
<FormatStr Value="$#,###.00"/>
<Memo Value="[Detail.&quot;PRICE&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taRightJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object12>
<Object13>
<Name Value="Line1"/>
<ClassName Value="TfrLineView"/>
<Visible Value="1"/>
<Typ Value="gtLine"/>
<StreamMode Value="0"/>
<Size>
<Left Value="56"/>
<Top Value="376"/>
<Width Value="680"/>
<Height Value="0"/>
</Size>
<Flags Value="1"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
</Frames>
</Object13>
<Object14>
<Name Value="Memo9"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="664"/>
<Top Value="316"/>
<Width Value="72"/>
<Height Value="17"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="17039918"/>
<FormatStr Value="$#,###.00"/>
<Memo Value="[[Detail.&quot;QTY&quot;]*[Detail.&quot;PRICE&quot;]]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value=""/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taRightJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object14>
<Object15>
<Name Value="Memo10"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="64"/>
<Top Value="268"/>
<Width Value="56"/>
<Height Value="18"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="Year&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsItalic"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object15>
<Object16>
<Name Value="Memo11"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="124"/>
<Top Value="268"/>
<Width Value="136"/>
<Height Value="18"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="Author&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsItalic"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object16>
<Object17>
<Name Value="Memo12"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="264"/>
<Top Value="268"/>
<Width Value="200"/>
<Height Value="18"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="Title&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsItalic"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object17>
<Object18>
<Name Value="Memo13"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="468"/>
<Top Value="268"/>
<Width Value="84"/>
<Height Value="18"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="Company&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsItalic"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object18>
<Object19>
<Name Value="Memo14"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="560"/>
<Top Value="268"/>
<Width Value="36"/>
<Height Value="18"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="Qty&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsItalic"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taLeftJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object19>
<Object20>
<Name Value="Memo15"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="604"/>
<Top Value="268"/>
<Width Value="52"/>
<Height Value="18"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="Price&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsItalic"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taRightJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object20>
<Object21>
<Name Value="Memo16"/>
<ClassName Value="TfrMemoView"/>
<Visible Value="1"/>
<Typ Value="gtMemo"/>
<StreamMode Value="0"/>
<Size>
<Left Value="664"/>
<Top Value="268"/>
<Width Value="72"/>
<Height Value="18"/>
</Size>
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="558"/>
<FormatStr Value=""/>
<Memo Value="Subtotal&#xA;"/>
<Script Value=""/>
</Data>
<Font>
<Name Value="helvetica [urw]"/>
<Size Value="10"/>
<Color Value="clBlack"/>
<Charset Value="0"/>
<Style Value="fsItalic"/>
</Font>
<Highlight>
<FontStyle Value="2"/>
<FontColor Value="clBlack"/>
<FillColor Value="clWhite"/>
<HighlightStr Value=""/>
</Highlight>
<Alignment Value="taRightJustify"/>
<Layout Value="tlTop"/>
<Angle Value="0"/>
</Object21>
<Object22>
<Name Value="Line2"/>
<ClassName Value="TfrLineView"/>
<Visible Value="1"/>
<Typ Value="gtLine"/>
<StreamMode Value="0"/>
<Size>
<Left Value="56"/>
<Top Value="290"/>
<Width Value="680"/>
<Height Value="0"/>
</Size>
<Flags Value="1"/>
<Frames>
<FrameColor Value="clBlack"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
</Frames>
</Object22>
</Page1>
<FVal>
<Count Value="0"/>
</FVal>
<ParentVars Value=""/>
</Pages>
</LazReport>
</CONFIG>

View File

@ -79,4 +79,17 @@ After the project has been modified, recompile and run the program.
that this report is a "two-pass" report by ticking the checkbox that this report is a "two-pass" report by ticking the checkbox
found in File->Report Options->Two-Pass report. found in File->Report Options->Two-Pass report.
The resulting report can be found in thumbnails.lrf file. The resulting report can be found in thumbnails.lrf file.
2. Master-Detail sample.
The button "Master-Detail test" adds another dataset to project and
modify all dataset and controls layout and properties to create a
master-detail relationship.
This test use the masterdetail.lrf report file included in this directory.
In this project some aggregate functions are evaluated: COUNT and SUM.
Note how COUNT function references the detail band name to count the number
or records. The SUM function used to sum the result of the expression
QTY*PRICE for each record.

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<LazReport> <LazReport>
<Version Value="24"/> <Version Value="25"/>
<Title Value=""/> <Title Value=""/>
<Subject Value=""/> <Subject Value=""/>
<KeyWords Value=""/> <KeyWords Value=""/>
@ -14,14 +14,14 @@
<Pages> <Pages>
<PrintToDefault Value="False"/> <PrintToDefault Value="False"/>
<DoublePass Value="True"/> <DoublePass Value="True"/>
<SelectedPrinter Value="HP1100"/> <SelectedPrinter Value="LaserJet1100"/>
<PageCount Value="1"/> <PageCount Value="1"/>
<Page1> <Page1>
<Name Value="Page1"/> <Name Value="Page1"/>
<ClassName Value="TfrPageReport"/> <ClassName Value="TfrPageReport"/>
<Visible Value="1"/> <Visible Value="1"/>
<Width Value="547"/> <Width Value="1"/>
<Height Value="770" PageType="0"/> <Height Value="1" PageType="0"/>
<PgSize Value="9"/> <PgSize Value="9"/>
<Margins> <Margins>
<left Value="0"/> <left Value="0"/>
@ -74,7 +74,7 @@
</Data> </Data>
<BandType Value="btMasterData"/> <BandType Value="btMasterData"/>
<Condition Value=""/> <Condition Value=""/>
<DatasetStr Value="frDBDataSet1"/> <DatasetStr Value="frDbDetail"/>
</Object2> </Object2>
<Object3> <Object3>
<Name Value="Memo1"/> <Name Value="Memo1"/>
@ -91,10 +91,10 @@
<Flags Value="3"/> <Flags Value="3"/>
<FillColor Value="clSilver"/> <FillColor Value="clSilver"/>
<Frames> <Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clBlack"/> <FrameColor Value="clBlack"/>
<FrameBorders Value="frbLeft,frbTop,frbRight,frbBottom"/>
<FrameStyle Value="frsSolid"/> <FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value="frbLeft,frbTop,frbRight,frbBottom"/>
</Frames> </Frames>
<Data> <Data>
<Format Value="556"/> <Format Value="556"/>
@ -134,15 +134,15 @@
<Flags Value="3"/> <Flags Value="3"/>
<FillColor Value="clNone"/> <FillColor Value="clNone"/>
<Frames> <Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clBlack"/> <FrameColor Value="clBlack"/>
<FrameBorders Value=""/>
<FrameStyle Value="frsSolid"/> <FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames> </Frames>
<Data> <Data>
<Format Value="556"/> <Format Value="556"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;TITLE&quot;] &#xA;"/> <Memo Value="[Detail.&quot;TITLE&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -177,15 +177,15 @@
<Flags Value="3"/> <Flags Value="3"/>
<FillColor Value="clWhite"/> <FillColor Value="clWhite"/>
<Frames> <Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clBlack"/> <FrameColor Value="clBlack"/>
<FrameBorders Value=""/>
<FrameStyle Value="frsSolid"/> <FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames> </Frames>
<Data> <Data>
<Format Value="556"/> <Format Value="556"/>
<FormatStr Value=""/> <FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;AUTHOR&quot;] &#xA;"/> <Memo Value="[Detail.&quot;AUTHOR&quot;]&#xA;"/>
<Script Value=""/> <Script Value=""/>
</Data> </Data>
<Font> <Font>
@ -220,10 +220,10 @@
<Flags Value="3"/> <Flags Value="3"/>
<FillColor Value="clNone"/> <FillColor Value="clNone"/>
<Frames> <Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clNone"/> <FrameColor Value="clNone"/>
<FrameBorders Value=""/>
<FrameStyle Value="frsSolid"/> <FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames> </Frames>
<Data> <Data>
<Format Value="556"/> <Format Value="556"/>