下面是一个在VB中运行ACCESS报表的方法: 在VB中如何使用直观、简便的报表一直是很多人关心的问题, Crystal Reports用起来又不太理想。现介绍一在VB中运行Microsoft Access报表的方法,用起来还不错。 利用Automation运行Microsoft Access报表 1. 使用Microsoft Access建立数据库(如:novelty.mdb)的相关报表(如:rptEmployess)。 2. 创建引用 在VB中使用“Project References"菜单创建一个对Microsoft Access 8.0 Object Library的引用。 3. 程序清单 'References MS Access 8.0 Object Library (this 'code will work with any verson of Access that 'supports Automation) Dim MSAccess As Access.Application Private sub Command1_Click() Set MSAccess=NEW Access.Application MSAccess.OpenCurrentDatabase(App.Path & "\novelty.mdb") MSAccess.DoCmd.OpenReport "rptEmployess",acViewNormal MSAccess.CloseCurrentDatabase Set MSAccess=Nothing end Sub 注:acViewNormal告知Access打开该报表并立即打印。 这种方法有个缺点,就是运行环境中必须装有MS Access。
给我发一个,[email protected]
加上最新的ARSP4效果好
给我发一个,[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected] welcome to you!
vax2000
给我发一个,[email protected]
还有个问题是打印单据,我不知道怎么控制纸张大小,如象工资条那样的小条纸。不知道是不是打印机太老了,不支持自定义纸张。我改了纸张大小,但打印出来还是很长的纸,根本没起作用。
宽:19cm,高:9cm
谢谢!
至于工资单可以设置每一个detail之间的行距,然后去掉pageheader,pagefooter即可。
给我发一个好吗?
在此先谢了.
[email protected]
给我发一个好吗?谢谢
[email protected]
在VB中如何使用直观、简便的报表一直是很多人关心的问题, Crystal Reports用起来又不太理想。现介绍一在VB中运行Microsoft Access报表的方法,用起来还不错。
利用Automation运行Microsoft Access报表
1. 使用Microsoft Access建立数据库(如:novelty.mdb)的相关报表(如:rptEmployess)。
2. 创建引用
在VB中使用“Project References"菜单创建一个对Microsoft Access 8.0 Object Library的引用。
3. 程序清单
'References MS Access 8.0 Object Library (this
'code will work with any verson of Access that
'supports Automation)
Dim MSAccess As Access.Application
Private sub Command1_Click()
Set MSAccess=NEW Access.Application
MSAccess.OpenCurrentDatabase(App.Path & "\novelty.mdb")
MSAccess.DoCmd.OpenReport "rptEmployess",acViewNormal
MSAccess.CloseCurrentDatabase
Set MSAccess=Nothing
end Sub
注:acViewNormal告知Access打开该报表并立即打印。
这种方法有个缺点,就是运行环境中必须装有MS Access。
[email protected]
可以去下载看看?
http://go.163.com/~711rainbow
如果上面的地址不行可以去:
http://newofficer.yeah.net
并下载升级版。
给我发一个好吗?谢谢
[email protected]
您好:
为了能够在VB打印固定的纸张(长:9CM,宽:16cm),可以我是用尽心思,
但还是没有办法。能否发一给我好吗?深表感谢!!!
email:[email protected]
email:[email protected]