Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
KGOrders
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cam Hayes
KGOrders
Commits
90263cad
Commit
90263cad
authored
Dec 15, 2024
by
Mac Stephens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commented out placeholders in rOrders declarations
parent
39bcaa4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
rOrders.dfm
kgOrdersServer/Source/rOrders.dfm
+2
-2
rOrders.pas
kgOrdersServer/Source/rOrders.pas
+25
-25
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersServer/Source/rOrders.dfm
View file @
90263cad
...
...
@@ -26,8 +26,8 @@ object rptOrders: TrptOrders
'begin'
''
'end.')
Left = 2
82
Top = 1
58
Left = 2
78
Top = 1
86
Datasets = <>
Variables = <>
Style = <>
...
...
kgOrdersServer/Source/rOrders.pas
View file @
90263cad
...
...
@@ -9,11 +9,11 @@ uses
type
TrptOrders
=
class
(
TDataModule
)
frxReport
:
TfrxReport
;
frxPDFExport
:
TfrxPDFExport
;
frxDBDataset
:
TfrxDBDataset
;
DataSource
:
TDataSource
;
UniQuery
:
TUniQuery
;
//
frxReport: TfrxReport;
//
frxPDFExport: TfrxPDFExport;
//
frxDBDataset: TfrxDBDataset;
//
DataSource: TDataSource;
//
UniQuery: TUniQuery;
frxReport1
:
TfrxReport
;
frxPDFExport1
:
TfrxPDFExport
;
private
...
...
@@ -38,26 +38,26 @@ procedure TrptOrders.PrepareReport(OrderID: string);
var
SQL
:
string
;
begin
try
// 1. **Prepare the Query**
SQL
:=
'SELECT * FROM orders WHERE ORDER_ID = :OrderID'
;
UniQuery
.
Close
;
UniQuery
.
SQL
.
Text
:=
SQL
;
UniQuery
.
ParamByName
(
'OrderID'
).
AsString
:=
OrderID
;
UniQuery
.
Open
;
// 2. **Connect the Query to the Report**
frxDBDataset
.
DataSet
:=
UniQuery
;
// 3. **Set Report Variables (if needed)**
frxReport
.
Variables
[
'OrderID'
]
:=
QuotedStr
(
OrderID
);
// 4. **Prepare the Report**
frxReport
.
PrepareReport
(
True
);
except
on
E
:
Exception
do
raise
Exception
.
Create
(
'Error preparing the report: '
+
E
.
Message
);
end
;
//
try
//
// 1. **Prepare the Query**
//
SQL := 'SELECT * FROM orders WHERE ORDER_ID = :OrderID';
//
UniQuery.Close;
//
UniQuery.SQL.Text := SQL;
//
UniQuery.ParamByName('OrderID').AsString := OrderID;
//
UniQuery.Open;
//
//
// 2. **Connect the Query to the Report**
//
frxDBDataset.DataSet := UniQuery;
//
//
// 3. **Set Report Variables (if needed)**
//
frxReport.Variables['OrderID'] := QuotedStr(OrderID);
//
//
// 4. **Prepare the Report**
//
frxReport.PrepareReport(True);
//
except
//
on E: Exception do
//
raise Exception.Create('Error preparing the report: ' + E.Message);
//
end;
end
;
end
.
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
90263cad
[Settings]
MemoLogLevel
=
5
FileLogLevel
=
5
LogFileNum
=
2
5
LogFileNum
=
2
6
webClientVersion
=
1.0.0
[Database]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment