Crystal report and sql server ?!!!!!


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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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


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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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 Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

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.
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... :)
ahmosaAuthor Commented:
Thanx all
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.