首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 行业软件 >

vb表格(二)——打印报表

2012-10-19 
vb报表(二)——打印报表报表显示:Private Sub Form_Load()Dim WithEvents report As grproLibCtl.GridppRepo

vb报表(二)——打印报表

报表显示:

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加油,呵呵,继续研究。

热点排行