Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Login Failed Error
Message
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00950510
Message ID:
00950689
Views:
21
Yes, only one report fails
It only works on the development PC.




>I need to make sure I understand things:
>
>- Only one report fails
>- Does it fail on multiple PCs or just one?
>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform