-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuMainForm.pas
More file actions
86 lines (74 loc) · 2.66 KB
/
uMainForm.pas
File metadata and controls
86 lines (74 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
unit uMainForm;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxClasses, dxReport, cxGraphics,
cxLookAndFeels, cxLookAndFeelPainters, Vcl.Menus, cxButtons,
dxBackend, cxControls, cxStyles, cxCustomData, cxFilter, cxData,
cxDataStorage, cxEdit, cxNavigator, dxDateRanges, dxScrollbarAnnotations,
Data.DB, cxDBData, cxGridLevel, cxGridCustomView, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGrid, FireDAC.Comp.DataSet,
FireDAC.Comp.Client, dxBackend.ConnectionString.JSON.DataSet,
dxBackend.ConnectionString.JSON, Vcl.StdCtrls, dxmdaset, uData, cxContainer,
cxLabel, cxRadioGroup, cxGroupBox, dxCore, dxSkinsForm;
type
TMainForm = class(TForm)
dxReport1: TdxReport;
dxBackendDataConnectionManager1: TdxBackendDataConnectionManager;
btnDisplayDesigner: TcxButton;
btnDisplayReport: TcxButton;
dxBackendDataConnectionManager1dxBackendDataSetJSONConnection1: TdxBackendDataSetJSONConnection;
itmProducts: TdxBackendDataSetCollectionItem;
itmCategories: TdxBackendDataSetCollectionItem;
rbtnGroupLocalization: TcxRadioGroup;
rbtnSelectEnglishLocalization: TcxRadioButton;
rbtnSelectGermanLocalization: TcxRadioButton;
btnGroupDisplayDialog: TcxGroupBox;
dxSkinController1: TdxSkinController;
procedure FormCreate(Sender: TObject);
procedure btnDisplayDesignerClick(Sender: TObject);
procedure btnDisplayReportClick(Sender: TObject);
procedure rbtnSelectEnglishLocalizationClick(Sender: TObject);
procedure rbtnSelectGermanLocalizationClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.FormCreate(Sender: TObject);
const
// Path to a saved example report file
AFileName = 'ExampleReport.repx';
begin
// Load example report from a file
if FileExists(AFileName) then
begin
dxReport1.ReportName := 'ExampleReport';
dxReport1.Layout.LoadFromFile(AFileName);
end;
end;
procedure TMainForm.btnDisplayDesignerClick(Sender: TObject);
begin
// Display the DevExpress Report Designer dialog
dxReport1.ShowDesigner;
end;
procedure TMainForm.btnDisplayReportClick(Sender: TObject);
begin
// Display the DevExpress Report Viewer dialog
dxReport1.ShowViewer;
end;
procedure TMainForm.rbtnSelectEnglishLocalizationClick(Sender: TObject);
begin
// Switch Report UI to English
dxReport1.Language := 'en-US';
end;
procedure TMainForm.rbtnSelectGermanLocalizationClick(Sender: TObject);
begin
// Switch Report UI to German
dxReport1.Language := 'de-DE';
end;
end.