Commit 90263cad by Mac Stephens

commented out placeholders in rOrders declarations

parent 39bcaa4d
......@@ -26,8 +26,8 @@ object rptOrders: TrptOrders
'begin'
''
'end.')
Left = 282
Top = 158
Left = 278
Top = 186
Datasets = <>
Variables = <>
Style = <>
......
......@@ -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.
......
[Settings]
MemoLogLevel=5
FileLogLevel=5
LogFileNum=25
LogFileNum=26
webClientVersion=1.0.0
[Database]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment