|
@@ -54,19 +54,22 @@ type
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
FReports: TObject;
|
|
|
+ FReportsForm: TObject;
|
|
|
function CurValue(AGridDBA: TZjGridDBA; FieldName: string): Variant;
|
|
|
function Col(AGridDBA: TZjGridDBA; FieldName: string): Integer;
|
|
|
procedure GridGetFont(Sender: TObject; ACoord: TPoint; AFont: TFont; AGrid: TZjGrid; AGridDBA: TZjGridDBA);
|
|
|
procedure GridMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; AGrid: TZjGrid; AGridDBA: TZjGridDBA);
|
|
|
procedure GridShowHint(var HintStr: String; var CanShow: Boolean; var HintInfo: THintInfo; const ACoord: TPoint; AGrid: TZjGrid; AGridDBA: TZjGridDBA);
|
|
|
+ procedure SetReportsForm(const Value: TObject);
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
+ property ReportsForm: TObject read FReportsForm write SetReportsForm;
|
|
|
end;
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
-uses ReportManagerDM, ReportHistoryFrm;
|
|
|
+uses ReportManagerDM, ReportHistoryFrm, ReportsFrm;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
@@ -82,6 +85,7 @@ end;
|
|
|
|
|
|
procedure TReportManagerForm.FormCreate(Sender: TObject);
|
|
|
begin
|
|
|
+ FReportsForm := nil;
|
|
|
FReports := TReports.Create(nil);
|
|
|
zaLocal.DataSet := TReports(FReports).cdsLocal;
|
|
|
zaLocal.Grid := zgLoacl;
|
|
@@ -99,6 +103,8 @@ end;
|
|
|
procedure TReportManagerForm.FormDestroy(Sender: TObject);
|
|
|
begin
|
|
|
FReports.Free;
|
|
|
+ if (FReportsForm <> nil) then
|
|
|
+ TReportsForm(FReportsForm).RefreshReportTemplets;
|
|
|
end;
|
|
|
|
|
|
procedure TReportManagerForm.GridGetFont(Sender: TObject; ACoord: TPoint;
|
|
@@ -262,4 +268,9 @@ begin
|
|
|
GridShowHint(HintStr, CanShow, HintInfo, ACoord, zgCustom, zaCustom);
|
|
|
end;
|
|
|
|
|
|
+procedure TReportManagerForm.SetReportsForm(const Value: TObject);
|
|
|
+begin
|
|
|
+ FReportsForm := Value;
|
|
|
+end;
|
|
|
+
|
|
|
end.
|