PDA

Click to See Complete Forum and Search --> : Not showing the crystal report


ashly
Apr 22nd, 2008, 04:26 AM
Hi,

my vb coding are as below:



CrystalReport1.WindowTitle = "Testing Report"
CrystalReport1.ReportTitle = "Testing Report"
CrystalReport1.ReportFileName = App.Path & "\testing.rpt"

CrystalReport1.Connect "DSN = testing; UID = sa; PWD = sa"
CrystalReport1.Destination = crptToWindow
CrystalReport1.WindowState = crptMaximized
CrystalReport1.DiscardSavedData = True
CrystalReport1.Action = 1



I'm running my vb source code at Windows Vista, VB6 SP6, CR 8, DSN set to "testing" & tested successfully ...

After the code line "CrystalReport1.Action = 1", it shows the CR for a while, but no data, then it jump out and give me a "Cannot Open Sql Server" msgbox

any idea on how to solve this???

Hack
Apr 23rd, 2008, 12:29 PM
Do you have the proper connection to the server set up?

If you are getting this error, what is actually testing successfully?

ashly
Apr 23rd, 2008, 10:19 PM
Do you have the proper connection to the server set up?

If you are getting this error, what is actually testing successfully?

hmm... what do you mean by proper connection to the server set up?

May I know what is the difference using CrystalReport.Action = 1 and CrystalReport.PrintReport?

Hack
Apr 26th, 2008, 06:53 AM
I presume your SQL Server is setup on a network file server. You need access to both the file server as well as the database.