Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Login Failed Error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00950510
Message ID:
00950542
Vues:
16
Ok, here is the code. This is compiled from a couple places in the
application, but all relevant parts are here. I'm usong Fox2x tables.

This code is in use in my Viewer Application, which is working fine with
other applications. I just created a new app with a report, call this
and got the error.
FUNCTION DisplayReport
LPARAMETERS sReportFile, aTables

oCrystalApp = CREATEOBJECT("CrystalRuntime.Application")
oReport = oCrystalApp.OpenReport(sReportFile)

FOR nTable = 1 TO ALEN(aTables, 1)
	sTable = aTables[nTable,1]
	sAlias = aTables[nTable,2]
	lFound = SetTableLocation(sTable, sAlias)
NEXT

IF lFound

	** Errors here
	oReport.PrintOut(.F., .iCopies, .bCollated)

ENDIF 


********************************************
FUNCTION SetTableLocation
LPARAMETERS sTable, sAlias

oDataBase	= oReport.Database
oTables 	= oDataBase.Tables

FOR nTable = 1 TO ALEN(aTables, 1)

	sTable = aTables[nTable,1]
	sAlias = aTables[nTable,2]

	FOR iTable = 1 TO oTables.Count

		oTable = oTables.Item(iTable)

		IF cAlias = UPPER(ALLTRIM(oTable.Location))

			lFound = TRUE
			oTable.SetTableLocation(cTable, JUSTSTEM(cTable), "")
			
			EXIT

		ENDIF

	ENDFOR		

NEXT

RETURN lFound
>Are you using native Crystal data connections?
>Can you post the code?
>
>>I'm getting a login failed error when I try to view the report
>>in runtime. I have checked to ensure that tables are Fox2x, that
>>they are in the correct location, and they are not i use.
>>
>>Anyone know other reasons I might get this error?
>>
>>Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform