Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report.Database.SetDataSource ?????

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how work this???

can use this for change the path of my database dinamyc

please somebody helpp memmmmm
 
depending of your method...

In my case from VB a just do

report.Database.SetDataSource (myrecordset)

where Myrecordset is the new recordset you want to assign
 
Use .SetDataSource if you originally built your Crystal Report using an ADO recordset and want to pass the recordset at run-time.

Use .SetLoginInfo or .LogonServer to connect to the db. Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
can you give me some code example for connect my report to a database from any different physical location?

will be apreciate, because i am frustated getting this information, i can´t find it.

thank´s in advance..
 
Dim Report as CrystalReport1

...

Report.Database.Tables(1).SetLogOnInfo "server name", _
"db name", "username", "password"

or

Report.Database.Tables(1).SetLogOnInfo "DSN", , "username, "password" Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
1. if the report link different table, i need to put .tables(2),.tables(3) for each table???...

2. i can use the especific location, like this
Report.Database.Tables(1).SetLogOnInfo "\\computer1\database.mdb", , "username, "password"
 
If all the tables come from the same db, you only need one call to .Tables(1).

I don't think you use .SetLogonInfo for MS Access. Is it a password protected database? If not, there's nothing to login to. Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top