- 1、本文档共18页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
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
- 中国水稻研究所水稻种质资源中期库建设项目报告表.pdf
- 全自动X射线轮胎检测系统建设项目报告表.pdf
- 桐庐县前溪流域治理工程报告表.pdf
- 年产34万吨瓶装纯净水高速生产线升级项目报告表.pdf
- G2531杭州至上饶高速公路(杭淳开高速公路)杭州中环至浙赣界(杭州段)报告书.pdf
- 2025年云南省中考历史真题含答案.docx
- 广东省大湾区2024-2025学年高一下学期7月期末考试政治试题含答案.pdf
- 陕西省汉中市2024-2025学年高二下学期期末质量检测含答案(9科试卷).pdf
- 福建省南平市2024-2025学年第二学期高二下期末质量检测试卷含答案(9科试卷).pdf
- 河北省石家庄2024-2025学年高二下学期期末教学质量检测含答案(9科试卷).pdf
文档评论(0)