PDA

View Full Version : Where a CR (MSSQL) gets the Server?



Peter Bragg
8-Mar-2006, 03:56 PM
Ok. I need someone to talk to me as if I am stupid. Which to be honest,
isn't too far from the truth. I don't write Crystal Reports and have a very
limited knowledge. So here goes.

We have some reports, written in 8.5, that we have running against MSSQL
using ODBC. Now, not knowing anything about Crystal Reports (did I mention
that already?) I always assumed that the knowledge of the Server/Database
etc came from the .DSN file. But we have a client that opened one of our
reports in Crystal, no .dsn in sight, and the report "knew" of our Server
name. So I can only conclude that the Server name must be embedded in the
report itself somewhere. Does this sound right? I am going to assume that it
must be possible to create a Crystal Report to run on a MSSQL database such
that the server name isn't embedded in the report, on the assumption that if
not, this would seem very limiting.

So, any help would be appreciated on how anyone writes and deploys Crystal
Reports against an MSSQL database, as I could really do with understanding
how everything hangs together.

Do we have to use a .DSN file to deploy? For some reason I didn't think we
did. I thought our VDF application could provide the Server/Database/User
information required to log the CR into the MSSQL database using
NthTableLogOnServerName, NthTableLogOnDatabaseName,NthTableLogOnServerUserI D
and NthTableLogOnPassword. However, in practice the only way we have been
able to make the reports run at our Clients sites, is to deploy a .DSN,
although it only needs to contain the following:

[ODBC]
DRIVER=SQL SERVER
SERVER=<SERVERNAME>

Sorry to repeat myself, but I could really do with hearing how other users
write/deploy CRs on MSSQL. In an ideal world I would like not to have to
deploy a DSN file, because this would need to be different at each Client
site. We already have a mechansim for logging our VDF applicaiton into the
database, and I would prefer to simply use the same information we use to
log this in to programatically log in the Crystal Reports. Is this possible?

As you can tell, I really don't know much!! Any knowledge here would be
helpful.

Peter Bragg

Holger W.
9-Mar-2006, 02:47 AM
Peter,

I made the same experience. CR has the servername and even databasename
embedded. There were some costumers where I had to rewrite the report
because I could not use the same databasename and /or servername as usually.
I think that's a problem not very flexible. Even the ODBC - Entry isn't used
by CR.
(CR XI; VDF 9.1; Win2K)

regards
Holger