[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

Crystal Reports Question

I'm using the activeX Crystal reports component to access a sql server (6.5).

This code was already in the project:

MDIForm1.CrystalReport1.LogOffServer 1, True
MDIForm1.CrystalReport1.LogonInfo(0) = "DSN=" & MDIForm1.Server & _
'         ";uid=;pwd=;database=" & MDIForm1.Database
  MDIForm1.CrystalReport1.WindowState = crptMaximized
  MDIForm1.CrystalReport1.Action = 1

where mdiform1.server = "serverName"
and mdiform1.database = "databasename"

We are now changing to sql server 7 and this no longer works.
Where can I find info on how this connection string should read?
I tried setting it up like the database connection:

.ConnectionString = "DRIVER={SQL Server};DATABASE=" & mconstDatabase & _
                          ";SERVER=" & mconstServer

Any suggestions?
1 Solution
it may not be the code but rather the crystal report itself. i have no experience with CR and SQl x.x, however, i do have experience with CR and access and i know that when the db changes in anyway, that cr will not print it and you get some component error that is of little use and points you in no particular direction. to fix this, go to the CR report and reverify your database. you can find it under the database menu item in the designer window.

if this doesn't do the trick, i know that seagate has a bulletin board set up on their web site for q&a. sorry don't know the address off hand. just go to the seagate web site. there's a link to from there.

hope this helps.
rutledgjAuthor Commented:
I've already verified database, its ok. Couldn't find anything on seagates knowledge base either
Try this

CurrentConnection = "Provider=MSDASQL;DRIVER=SQL Server; SERVER=" & Server & "; DATABASE=" & dbname & "; UID=" & Userid_db & ";PWD=" & PassWD & ""

Report1.connect = CurrentConnection

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now