网站大量收购独家精品文档,联系QQ:2885784924

VB中水晶报表使用(国外英文资料).doc

  1. 1、本文档共18页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 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

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档