Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Our Crystal Runtime Solution -Very Long Post
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00404613
Message ID:
00426001
Vues:
24
Hi Roxanne,

I tried this at the command prompt. I have a report with 1 table in it called "agefile.dbf". At runtime, this file name will be changed to a temp file name (i.e. 11111111.DBF).

My temp directory is C:\TEMP.

At the command prompt, I enter:

oreportengine = CREATEOBJECT("CrystalRuntime.Application")
oreport = oreportengine.openreport("AGE.RPT")

? oreport.database.tables.item(1).location && results in P:\CR\agefile.dbf
? oreport.database.tables.item(1).name && results in agefile

I then change the location:
oreport.database.tables.item(1).location = "C:\TEMP\11111111.DBF"
oreport.printout() && results in error message..cannot find agefile

If I change the 'name' property to "11111111" or "11111111.dbf" I get error saying it cannot find "11111111".

The reason I change the table name is to prevent naming conflicts between reports (i.e. each report may have a "header" table, and they wouldn't all be named "header" since running two reports at the same time would cause a conflict if placing the files in the same location i.e. C:\TEMP.

I noticed in your code the table name was a parameter. I guess the big question is do you guys change the table name at runtime, or simply point to a different location. I would have expected that "agefile" in the above example would simply be an alias, and you could use in named table you wanted at runtime. Is this the wrong assumption?

Thanks for your help.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform