报表显示:
Private Sub Form_Load() Dim WithEvents report As grproLibCtl.GridppReport '实例化报表 Set report = New grproLibCtl.GridppReport '报表建立的位置 report.LoadFromFile (App.Path & "\CheckDay.grf") '和数据库连接 report.DetailGrid.Recordset.ConnectionString = "FileDSN=chargeroom.dsn;uid=sa;pwd=123456" '数据源 '查询表 txtSQL = "select * from CheckDay_Info" '把记录查询出来,显示在报表里 report.DetailGrid.Recordset.QuerySQL = txtSQL '查看报表 GRDisplayViewer1.report = report GRDisplayViewer1.Start End Sub
打印:
report.[Print] (True)
打印预览:
report.PrintPreview (True)
- 2楼cjr152336611435小时前
- 学习啦
- Re: liutengteng1305小时前
- 回复cjr15233661143n加油啊。
- 1楼dandanzmc昨天 18:58
- 我的周出不来,呜呜呜呜
- Re: liutengteng130昨天 08:57
- 回复dandanzmcn加油,呵呵,继续研究。