ScReportFrm.pas 643 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. unit ScReportFrm;
  2. interface
  3. uses
  4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5. Dialogs, ScReportViewFrame, ScProjectManager;
  6. type
  7. TReportFrm = class(TForm)
  8. ReportView: TReportViewFrame;
  9. private
  10. { Private declarations }
  11. public
  12. { Public declarations }
  13. end;
  14. function ShowReportForm(AProject: TProject): Boolean;
  15. implementation
  16. {$R *.dfm}
  17. function ShowReportForm(AProject: TProject): Boolean;
  18. var
  19. ReportFrm: TReportFrm;
  20. begin
  21. ReportFrm := TReportFrm.Create(nil);
  22. ReportFrm.ReportView.init(AProject);
  23. try
  24. ReportFrm.ShowModal;
  25. finally
  26. ReportFrm.Free;
  27. end;
  28. end;
  29. end.