I'm looking for a sample code integrating Crystal 9 into VF7 with SQL2000 as database. Can you give me one? Most of the sample code used Access,Foxpro DB as database.
Do Case
Case Option1.Value = 1
DO FORM f:\acctapps\gl_001\h_gl\f_crystal WITH "f:\ACCTAPPS\REPORT\SI_BOOK.RPT"
Case Option2.Value = 2
DO FORM f:\acctapps\gl_001\h_gl\f_crystal WITH "f:\ACCTAPPS\REPORT\CSI_BOOK.RPT"
...
Endcase
My second form is for viewing the report.
--Init
LPARAMETERS tcReport
LOCAL oCrystal as CRAXDRT.Application
LOCAL oReport as CRAXDRT.Report
WITH This
.WindowState = 2
oCrystal = CREATEOBJECT("Crystalruntime.Application"
oReport = oCrystal.OpenReport(tcreport)
Logon failed.
Details:[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'USER'
I tried to add this code but same problem
oCrystal.LogOnServer("p2ssql.dll","FINANCE","HPI_GL","user","grant"
Have you tried running your report independently of VFP, that is, from within Crystal Reports? If so, do you get a similar message? If so, check the ODBC parameters, especially the user name, password and default database.
If it works within Crystal, go back to your VFP code and call the SetLogonInfo() method of the table objects. The syntax is something like this:
If you have more than one table, repeat the above for each of them.
You might also have to set the Name and Location properties of each of these tables. In each case, set these just to the name of the table (the same setting for Name and Location).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.