本人想用FastReport做报表,请教各位大虾其代码作参考学习,本人也看过它自带的例子,但是好似做什么都要写代码进去,可以自行设好,只有一按钮就能实现做好报表吗?
以下代码行吗?unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, DBTables, FR_DSet, FR_DBSet, FR_Class, StdCtrls, Buttons;type
  TForm1 = class(TForm)
    BitBtn1: TBitBtn;
    frReport1: TfrReport;
    frDBDataSet1: TfrDBDataSet;
    DataSource1: TDataSource;
    Table1: TTable;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.BitBtn1Click(Sender: TObject);
begin
   frREPORT1.ShowReport;
end;   end.

解决方案 »

  1.   

    自己做的,就知道frReport控件,它有个属性storeInDFM属性,这样可以不用*.frf外部文件了,直接集成到你都工程中。
    2、若用*.frf文件,你你得在Form上加一个,frReport控件,
    procedure TFrmfaListSub.button1click(Sender: TObject);
    begin
      frReport1.LoadFromFile('你的.frf');
      frReport1.ShowReport;//这是预览,要直接打印看fastreport帮助。  
    end;更多请参考frReport控件中文帮助....www.delphibox.com有下...