[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


saving Crystal Report ADO connection string or ODBC connection details with report

Posted on 2004-10-24
Medium Priority
Last Modified: 2012-08-13
I have a Crystal Reports 8.5 report.
My DB is MySQL.
When I try to open the report from a VB6 application I'm told my access is denied - no password.
I fill in the password in the ODBC driver DSN configuration form
(and all is good - I test the connection and it works fine) and hit OK and save the report, it doesn't seems to solve the problem.
I build an ADO connection string (my preferred way) but it doesn't seemed to be saved with the report either.
How do I save the ODBC connection details with the report or set it by code?

Question by:Etzie
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 13

Accepted Solution

vidru earned 1500 total points
ID: 12407398
If you're using the OCX (Crystal Report Control), use the Connect property:

With CrystalReport1
    .ReportFileName = "C:\YourReport.rpt"
    .Connect = "DSN=ODBC_DSN_Name;UID=Username;PWD=Password;DBQ=dbName"
    .Action = 1
End With

With the RDC (Report Designer Component) use the SetLogOnInfo method:

crxRpt.Database.Tables(1).SetLogOnInfo strServerOrDSNName, strDBNameOrPath, strUserID, strPassword


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
How to increase the row limit in Jasper Server.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question