Commit 90263cad by Mac Stephens

commented out placeholders in rOrders declarations

parent 39bcaa4d
...@@ -26,8 +26,8 @@ object rptOrders: TrptOrders ...@@ -26,8 +26,8 @@ object rptOrders: TrptOrders
'begin' 'begin'
'' ''
'end.') 'end.')
Left = 282 Left = 278
Top = 158 Top = 186
Datasets = <> Datasets = <>
Variables = <> Variables = <>
Style = <> Style = <>
......
...@@ -9,11 +9,11 @@ uses ...@@ -9,11 +9,11 @@ uses
type type
TrptOrders = class(TDataModule) TrptOrders = class(TDataModule)
frxReport: TfrxReport; // frxReport: TfrxReport;
frxPDFExport: TfrxPDFExport; // frxPDFExport: TfrxPDFExport;
frxDBDataset: TfrxDBDataset; // frxDBDataset: TfrxDBDataset;
DataSource: TDataSource; // DataSource: TDataSource;
UniQuery: TUniQuery; // UniQuery: TUniQuery;
frxReport1: TfrxReport; frxReport1: TfrxReport;
frxPDFExport1: TfrxPDFExport; frxPDFExport1: TfrxPDFExport;
private private
...@@ -38,26 +38,26 @@ procedure TrptOrders.PrepareReport(OrderID: string); ...@@ -38,26 +38,26 @@ procedure TrptOrders.PrepareReport(OrderID: string);
var var
SQL: string; SQL: string;
begin begin
try // try
// 1. **Prepare the Query** // // 1. **Prepare the Query**
SQL := 'SELECT * FROM orders WHERE ORDER_ID = :OrderID'; // SQL := 'SELECT * FROM orders WHERE ORDER_ID = :OrderID';
UniQuery.Close; // UniQuery.Close;
UniQuery.SQL.Text := SQL; // UniQuery.SQL.Text := SQL;
UniQuery.ParamByName('OrderID').AsString := OrderID; // UniQuery.ParamByName('OrderID').AsString := OrderID;
UniQuery.Open; // UniQuery.Open;
//
// 2. **Connect the Query to the Report** // // 2. **Connect the Query to the Report**
frxDBDataset.DataSet := UniQuery; // frxDBDataset.DataSet := UniQuery;
//
// 3. **Set Report Variables (if needed)** // // 3. **Set Report Variables (if needed)**
frxReport.Variables['OrderID'] := QuotedStr(OrderID); // frxReport.Variables['OrderID'] := QuotedStr(OrderID);
//
// 4. **Prepare the Report** // // 4. **Prepare the Report**
frxReport.PrepareReport(True); // frxReport.PrepareReport(True);
except // except
on E: Exception do // on E: Exception do
raise Exception.Create('Error preparing the report: ' + E.Message); // raise Exception.Create('Error preparing the report: ' + E.Message);
end; // end;
end; end;
end. end.
......
[Settings] [Settings]
MemoLogLevel=5 MemoLogLevel=5
FileLogLevel=5 FileLogLevel=5
LogFileNum=25 LogFileNum=26
webClientVersion=1.0.0 webClientVersion=1.0.0
[Database] [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