[Webinar] Streamline your web hosting managementRegister Today


Crystal report and sql server ?!!!!!

Posted on 1999-12-22
Medium Priority
Last Modified: 2013-12-25

Any one here used crystal report with sql server ?
I have crystal report ver 4.5 , VB 6  and sql server 6.5 and
I tried to connect the sql server to refresh data but i got  error message ( rong parameters)

my code is

Creport1.Connect = "DSN = std;UID = ahm;PWD = ahm;DSQ = nort"
Creport1.ReportFileName = "C:\test\nt.rpt"
Creport1.Action = 1

Question by:ahmosa

Expert Comment

ID: 2300022
ok the first thing i suggets you try is goto to this site and download the free version of Crystal 6

it is much easier and better to use than 4,6. It also plugs directly into vb the help files are better and also you do not have to worry about your report files being seperate to your exe file for your app. Because crystal 6 & 7 combine the rportfiles into the exe file.

Me personnaly i have not hooked upto sql via crystal and vb. I will try a little project and let u know tommorow



Accepted Solution

gwamb earned 800 total points
ID: 2300402
I've the same problem with CR5. This problem was in connect string (in DNS entry).

So I uses as connect string this:


for detailed description look in MSDN

Expert Comment

ID: 2300687
Why do you want to connect via VB.  Why not just establish your dsn connections within Crystal Reports.

This is what I always do and I 've never had any problems.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

LVL 18

Expert Comment

ID: 2302216
A couple of questions.  When you created the report, what did you pick for a DSN?  Did you use std or another one?  Crystal will sometimes get confused if the location doesn't match.  Also, you might try changing your connect string to:

Creport1.Connect = "ODBC;UID=ahm;PWD=ahm;DSN=std"

This tells Crystal where to go to look up the driver info.  Also, there are some cases where you need to have the DSN as the last parm in the connect string.  Finally, I noticed that you had spaces between the equals signs, you can't have any spaces. You don't need the DSQ.

Oh, and I think I remember using 4.5 with VB 3, are you sure that 4.5 is 32-bit?  If not, that would give you a problem.

Expert Comment

ID: 2302322
Hi ahmosa,
So, U are into Crystal full-fledged. I remember answering one of Ur earlier Questions. Well, Its been a long time since I used Crystal 4.6. Anyway, firstly, how have U built the report in Crystal ? Have U used DSN there Or have U straight away connected with SQl Server? Because calling crystal report from VB depends on how U have designed it.. Throw some light on these details & I'll get back to U.

This is To CraiqLazer,
I don't see the point in increasing the EXE size, if the reports can be safely called from the EXE itself.. We have been doing this with Databases like SQL Server, Oracle, Sybase, etc... :)

Author Comment

ID: 2302847
Thanx all

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

591 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