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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -30,7 +30,7 @@ uses
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_BarC, LR_RRect, LR_Shape, LR_ChBox, lr_e_pdf, lconvencoding, lr_e_gen,
lr_utils, LCLProc, custompreview;
lr_utils, LCLProc, ExtCtrls, custompreview;
type
@ -53,7 +53,8 @@ type
accCustomPreview: TAction;
ActionList1: TActionList;
ApplicationProperties1: TApplicationProperties;
btnCallEditor: TButton;
btnMasterDetail: TToggleBox;
btnNewReport: TButton;
btnCustomPreview: TButton;
btnPrintGrid: TButton;
btnPreviewReport: TButton;
@ -63,6 +64,11 @@ type
btnImageList: TButton;
btnComposite: TButton;
comboIndex: TComboBox;
frDbMaster: TfrDBDataSet;
mastergrid: TDBGrid;
Panel1: TPanel;
srcMaster: TDatasource;
master: TDbf;
srcDetail: TDatasource;
DetailAUTHOR: TStringField;
DetailCOMPANY1: TStringField;
@ -84,7 +90,7 @@ type
frCheckBoxObject1: TfrCheckBoxObject;
Composite: TfrCompositeReport;
frCSVExport1: TfrCSVExport;
frDBDataSet1: TfrDBDataSet;
frDbDetail: TfrDBDataSet;
frRoundRectObject1: TfrRoundRectObject;
frShapeObject1: TfrShapeObject;
frUserDataset1: TfrUserDataset;
@ -126,6 +132,7 @@ type
procedure accPreviewReportExecute(Sender: TObject);
procedure accPrintGridExecute(Sender: TObject);
procedure accPrintReportExecute(Sender: TObject);
procedure btnMasterDetailClick(Sender: TObject);
procedure comboIndexSelect(Sender: TObject);
procedure gridTitleClick(Column: TColumn);
procedure frmMainCreate(Sender: TObject);
@ -138,10 +145,12 @@ type
FImageList: TStringList;
FImageListIndex: Integer;
FObjCount: Integer;
FCountryIndex: Integer;
procedure UpdateAppTranslation;
procedure SetIndex(const aIndexName: string);
procedure OpenReport(const aFileName:string);
procedure UpdateActiveReport;
procedure MasterDetail;
public
{ public declarations }
end;
@ -327,7 +336,15 @@ end;
procedure TfrmMain.accPreviewReportExecute(Sender: TObject);
begin
if btnMasterDetail.Checked then begin
grid.DataSource := nil;
MasterGrid.Datasource := nil;
end;
TheReport.ShowReport;
if btnMasterDetail.Checked then begin
MasterGrid.DataSource := srcMaster;
grid.Datasource := srcDetail;
end;
end;
procedure TfrmMain.accPrintGridExecute(Sender: TObject);
@ -343,6 +360,11 @@ begin
ShowMessage(cerPrepareFailed);
end;
procedure TfrmMain.btnMasterDetailClick(Sender: TObject);
begin
MasterDetail;
end;
procedure TfrmMain.comboIndexSelect(Sender: TObject);
var
i: Integer;
@ -393,11 +415,15 @@ begin
Detail.FilePath := 'db/';
Detail.TableName := 'disco.dbf';
Detail.open;
Master.Close;
Master.TableName := 'db/countries.dbf';
comboIndex.Clear;
comboIndex.Items.Add(cerNone);
for i:=0 to Detail.Indexes.Count-1 do
comboIndex.Items.Add(Detail.Indexes[i].Name);
FCountryIndex := ComboIndex.Items.IndexOf('BYCOUNTRY');
SetIndex('');
if FileExistsUTF8(ExtractFilePath(ParamStrUTF8(0))+'salida.lrf') then
@ -476,6 +502,30 @@ begin
SBar.Panels[0].Text:= format(cerActiveReport, [TheReport.FileName]);
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;
var
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
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"?>
<CONFIG>
<LazReport>
<Version Value="24"/>
<Version Value="25"/>
<Title Value=""/>
<Subject Value=""/>
<KeyWords Value=""/>
@ -14,14 +14,14 @@
<Pages>
<PrintToDefault Value="False"/>
<DoublePass Value="True"/>
<SelectedPrinter Value="HP1100"/>
<SelectedPrinter Value="LaserJet1100"/>
<PageCount Value="1"/>
<Page1>
<Name Value="Page1"/>
<ClassName Value="TfrPageReport"/>
<Visible Value="1"/>
<Width Value="547"/>
<Height Value="770" PageType="0"/>
<Width Value="1"/>
<Height Value="1" PageType="0"/>
<PgSize Value="9"/>
<Margins>
<left Value="0"/>
@ -74,7 +74,7 @@
</Data>
<BandType Value="btMasterData"/>
<Condition Value=""/>
<DatasetStr Value="frDBDataSet1"/>
<DatasetStr Value="frDbDetail"/>
</Object2>
<Object3>
<Name Value="Memo1"/>
@ -91,10 +91,10 @@
<Flags Value="3"/>
<FillColor Value="clSilver"/>
<Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clBlack"/>
<FrameBorders Value="frbLeft,frbTop,frbRight,frbBottom"/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value="frbLeft,frbTop,frbRight,frbBottom"/>
</Frames>
<Data>
<Format Value="556"/>
@ -134,15 +134,15 @@
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clBlack"/>
<FrameBorders Value=""/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="556"/>
<FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;TITLE&quot;] &#xA;"/>
<Memo Value="[Detail.&quot;TITLE&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
@ -177,15 +177,15 @@
<Flags Value="3"/>
<FillColor Value="clWhite"/>
<Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clBlack"/>
<FrameBorders Value=""/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="556"/>
<FormatStr Value=""/>
<Memo Value="[Dbf1.&quot;AUTHOR&quot;] &#xA;"/>
<Memo Value="[Detail.&quot;AUTHOR&quot;]&#xA;"/>
<Script Value=""/>
</Data>
<Font>
@ -220,10 +220,10 @@
<Flags Value="3"/>
<FillColor Value="clNone"/>
<Frames>
<FrameWidth Value="1"/>
<FrameColor Value="clNone"/>
<FrameBorders Value=""/>
<FrameStyle Value="frsSolid"/>
<FrameWidth Value="1"/>
<FrameBorders Value=""/>
</Frames>
<Data>
<Format Value="556"/>