- 1、本文档共18页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VB中水晶报表使用(国外英文资料)
VB中水晶报表使用(国外英文资料)
The first step:
In the VB Project, the Project menu adds Add Crystal Report 9 and the Report name is used by default. Then Form2 (the Form that Crystal Rerport automatically adds, assuming it is called Form2) is automatically assigned the following code:
Option Explicit
Dim Report as New Cystal1
Private Sub Form_Load ()
Screen. MousePointer = vbHourglass calls the crystal report with the mouse in the hourglass
The value of this statement will be modified later in the crviewer90.reportsource = Report
CRViewer91 ViewReport
Screen. MousePointer = vbDefault calls the crystal report to the default shape
End Sub
Private Sub Form_Resize ()
CRViewer91. Top = 0
CRViewer91. Left = 0
CRViewer91. Height = ScaleHeight
CRViewer91. Width = ScaleWidth
End Sub
Step two:
Click the database field in the Crystal Report designer, and select database expert... , then click create new connections, and then point only field definition, to create database definition file, the field name and width is consistent with the original database table. Finally, the corresponding fields are obtained in the database field, placed on the report, and configured as required by the crystal report.
Step 3:
This step is critical, adding a Modual to the project file, defining the global ADODB variable, and implementing the dynamic connection of the database and the crystal reports. The code is as follows:
Public conn As New ADODB. Connection
Public rs As New ADODB. You
Step 4:
For ADO database connection considerations for VB programs, see the print button routines below.
Private Sub Command1_Click ()
Dim connstr As String
If conn. State = adStateOpen Then conn
Connstr = Provider = Microsoft. Jet.oledb.4.0; Data Source = app.path \ prtest.mdb; Persist Security Info = False prtest.mdb is the test Access database for the current directory of the program
Conn. The ConnectionString = connstr
Conn. Open
Conn. CursorLocation = adUseClient
If rs. State = adStateOpen Then rs. Close
Open test, con
您可能关注的文档
- MFC 操作Excel(国外英文资料).doc
- Microsoft Office 2007 产品密钥(国外英文资料).doc
- mimo技术(国外英文资料).doc
- MODBUS闲说(国外英文资料).doc
- MP3Enc接口说明(国外英文资料).doc
- MongoDB常用的操作命令(国外英文资料).doc
- MFC socket编程(国外英文资料).doc
- MP3、U盘故障"无法识别的USB设备"处理方法(国外英文资料).doc
- mp3制作(国外英文资料).doc
- mpc8272 光盘文件目录(国外英文资料).doc
- 北京大学药理学课件第四十四章--抗病毒药和抗真菌药.pptx
- 20115al corporation-申说明订阅图片任务组2214 an632.pdf
- 周新闻稿-品牌故事版.pdf
- 说明m1 xx markscheme biology sl paper 2生物学纸2TZ1.pdf
- 没有什么让害怕课程计划1nothing scares med38吓到.pdf
- vcds隐藏功能技术说明.pdf
- 坚定资源持续竞争优势杰jay barneyrabbit xu shi.pdf
- 说明确保卡并带上个趋势client当场选择哪种与它们相关reclaim responsibility收回责任.pdf
- 合创生产计划优化系统httc.pdf
- 房屋课程计划级araz lamyhouse.pdf
文档评论(0)