Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Question
Message
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00801397
Message ID:
00801891
Views:
28
Ok, one quention though. Right now I'm using the code below which
loops through the table collection looking form cAlias, and if/when it
finds it, sets the table at that location.

How does SetTableLocation know which table to set? What I mean is this; If
I have multiple tables in the report, Cust.Dbf, Invoices.Dbf and LineItems.dbf
and I call:
SetTableLocation("c:\temp\a3ds23.dbf", "a3ds23.dbf", "")
How does this function know which of the 3 tables to set?


My code:
FUNCTION SetTableLoc(oReport, cTable, cAlias) 

  oDataBase	= oReport.Database
  oTables 	= oDataBase.Tables

  FOR iTable = 1 TO oTables.Count
		
    oTable = oTables.Item(iTable)
		
    IF cAlias = ALLTRIM(oTable.Location)
	  	
      oDataBase.Tables(iTable).ConnectionProperties("Data File") = cTable
      oDataBase.Tables(iTable).Location = JUSTSTEM(cTable)
						
    ENDIF

  ENDFOR		

ENDPROC
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform