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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View Crystal Report through ODBC in VB

Status
Not open for further replies.

XJ900

Technical User
Apr 13, 2007
27
US
I suppose this is probably a basic question but this is what I am trying to do, keep in mind I am brand new to crystal reports and not the best VB programmer in the world.

I am trying to bring up a report designed to pull information from any one of about 20 databases. The db's are located on a MS SQL server. I have crystal report viewer control referenced in my VB although I have seen alot of code that uses CRAXDRT.dll.

I have no idea how to get the report to create a connection to our server. I think I have figured out how to the viewer but everything I try says the database.dll detected a database error.

I'm used to ODBC connections to databases but like I said I'm new to CR and am completely oblivious as to where to begin here. Can anyone please help?

Thanks
 
The viewer control is what you use to display a report on screen. Behind it is a CRAXDRT.App and .Report object. You need to set the properties of those first, including things like the database name, user and password.

Then assign the report object to the viewer and display the report.

Editor and Publisher of Crystal Clear
 
Can you tell me what the connect string is supposed to look like? I think that is where I am getting junked up the most, I'm not sure the format.
 
myReport.Database.LogOnServer "p2sodbc.dll", "DSN", "Database", "User", "Password"

check this out if you are just getting started. I am just starting too and it got me going in a morning, covers the very basics
 
Thanks, I will check it out. Appreciate the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top