0

I have created a Cryatal Report and set its Access database(.mdb) during design time. I have imported the crystal report into VB.NET. now i want to know how can we set the database path during runtime. The database to which i've linked will change its path and name every year.

Kindly hepl me out

3
Contributors
2
Replies
9
Views
10 Years
Discussion Span
Last Post by kacebaza
-1

I have created a Cryatal Report and set its Access database(.mdb) during design time. I have imported the crystal report into VB.NET. now i want to know how can we set the database path during runtime. The database to which i've linked will change its path and name every year.

Kindly hepl me out

hope it will help you :


Dim path1 As String = "your connection here" '" '' path
'' for normal ADO Concept
'' The current DataSource is an ADO

'' change path of the database
rpt.DataSourceConnections.Item(0). _
SetConnection("", "" & path1 & "", False)
'' if password is given then give the password
'' if not give it will ask at runtime
rpt.DataSourceConnections.Item(0).SetLogon("Admin", "")

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.