By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

DSN-Less To Crystal Reports

P: n/a
Hi,

I have an MS-Access 2000 application that is connected to a MS-SQL
Server 2000 backend by linking tables through a DSN-Less connection.
No problems at all with that part.

This application executes various Crystal Reports that have their own
built in SQL. These reports have no need for the MS-Access Linked
tables and can function stand-alone against MS-SQL.

According to Crystal Reports you can connect a report to MS-SQL with a
DSN-Less connection by setting the internal report parameters as so:

5. Type in the connection information.

Example:

Driver=SQL Server;
Server=SQL Server Production Server;
Database=Xtreme;
UID=SalesRep;
PWD=password1234

Yes that does work from within Crystal Reports but I want my MS-Access
(VBA code) to tell the report how to connect so I use the following
code:

[Form_Report Form].crxReport.Database.Tables.Item(1).SetLogOnInfo _
strServerName, _
strDatabase, _
strUserID, _
strPassword
From everything I can read, I don't have a parameter for "Driver" like

they show in their "manual setup" instructions. Unfortunately since
I'm not specifying the Driver in the above setup code I get an error

"datasource name not found and no default driver specified"

How do I tell Crystal Reports how to connect to this database using a
DSN-Less connection from VBA code?

Thanks

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
While you may be trying to control it from Access, it's still CR going
against SQL Server, so I'd expect that the driver would still be "SQL
Server".

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"ZRexRider" <je****@ptd.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi,

I have an MS-Access 2000 application that is connected to a MS-SQL
Server 2000 backend by linking tables through a DSN-Less connection.
No problems at all with that part.

This application executes various Crystal Reports that have their own
built in SQL. These reports have no need for the MS-Access Linked
tables and can function stand-alone against MS-SQL.

According to Crystal Reports you can connect a report to MS-SQL with a
DSN-Less connection by setting the internal report parameters as so:

5. Type in the connection information.

Example:

Driver=SQL Server;
Server=SQL Server Production Server;
Database=Xtreme;
UID=SalesRep;
PWD=password1234

Yes that does work from within Crystal Reports but I want my MS-Access
(VBA code) to tell the report how to connect so I use the following
code:

[Form_Report Form].crxReport.Database.Tables.Item(1).SetLogOnInfo _
strServerName, _
strDatabase, _
strUserID, _
strPassword
From everything I can read, I don't have a parameter for "Driver" like

they show in their "manual setup" instructions. Unfortunately since
I'm not specifying the Driver in the above setup code I get an error

"datasource name not found and no default driver specified"

How do I tell Crystal Reports how to connect to this database using a
DSN-Less connection from VBA code?

Thanks

Nov 13 '05 #2

P: n/a
Hi Doug,

Yes I understand which product is doing the work with SQL. My problem
is, Crystal Reports provides the following interface for programmatic
control and this interface does not have a parameter for driver:

[Form_Report Form].crxReport.Database.Tables.Item(1).SetLogOnInfo _
strServerName, _
strDatabase, _
strUserID, _
strPassword

I will want to use the same report on a number of databases so
embedding the connection string inside the report has no value.

Is there another way to tell crystal how to connect?

Nov 13 '05 #3

P: n/a
Sorry, I think you'll need to find a newsgroup related to Crystal, or else
check their web site.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"ZRexRider" <je****@ptd.net> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi Doug,

Yes I understand which product is doing the work with SQL. My problem
is, Crystal Reports provides the following interface for programmatic
control and this interface does not have a parameter for driver:

[Form_Report Form].crxReport.Database.Tables.Item(1).SetLogOnInfo _
strServerName, _
strDatabase, _
strUserID, _
strPassword

I will want to use the same report on a number of databases so
embedding the connection string inside the report has no value.

Is there another way to tell crystal how to connect?

Nov 13 '05 #4

P: n/a
Yeah - I tried the crystal group and their web site. Anyway - I
appreciate the time you took replying to my post. I'll puzzle it out
and post it - in the Crystal group ;-)

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.