crystal report, with, access, dynamic

How to set crystal report in, with access to become dynamic

Page 1 of 1

0 Replies - 4814 Views - Last Post: 24 February 2009 - 01:55 AM Rate Topic: -----

#1 fr35ht34  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-November 08

crystal report, with, access, dynamic

Post icon  Posted 24 February 2009 - 01:55 AM

I'm trying to use - access - crystalreport, how to set connection in crystal report file, exp : crystalreport2.rpt to dynamic, i've found the ways to sett dynamic with sql server. I found some articel which the acces must to set in odbc / dsn. I put my code in buttonclick, to show the report. Any help? Thank You

Dim cryRpt As New ReportDocument
		Dim crtableLogoninfos As New TableLogOnInfos
		Dim crtableLogoninfo As New TableLogOnInfo
		Dim crConnectionInfo As New ConnectionInfo
		Dim CrTables As Tables
		Dim CrTable As Table
		Dim path As String

		path = Application.StartupPath
		cryRpt.Load(Application.StartupPath & "\..\..\CrystalReport2.rpt")

		With crConnectionInfo
			.ServerName = path & "\hrdb2.mdb"
			.DatabaseName = path & "\hrdb2.mdb"  
		End With

		CrTables = cryRpt.Database.Tables
		For Each CrTable In CrTables
			crtableLogoninfo = CrTable.LogOnInfo
			crtableLogoninfo.ConnectionInfo = crConnectionInfo

		CrystalReportViewer1.ReportSource = cryRpt

Is This A Good Question/Topic? 0
  • +

Page 1 of 1