Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Relative path to graphics files
Message
De
23/06/2005 13:14:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Relative path to graphics files
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01025935
Message ID:
01025935
Vues:
75
We don't want report images stored in the executable.
We want them to be retrieved off disk at runtime, so we can change images without doing a build and release.


VFP seems to store the path to a graphic file as a relative path.
But at runtime VFP seems to translate that to an absolute path, based on the compile-time location of the FRX.

e.g.
path stored is graphics\<image file name>
compile time FRX is in \iic\iiccommon\reports
compile time image is in \iic\iiccommon\reports\graphics
run time program is in \connections
run time image is in \connections\graphics

Logically, I expect graphics\<image file name> to resolve to \connections\graphics\<image file name>
What happens is a dialog appears asking for the location of the image.
Only if the compile time absolute path exists does it load the image - from that path.

I think it is taking the path graphics\<image file name>
Then prepending the compile time path of the FRX (from the header record?)
And then using that as an absolute path, \iic\iiccommon\reports\graphics\<image file name>
Instead of using .\graphics\<image file name>

How should this work, and what's the best workaround?

Hacking the FRX isn't an elegant solution, because it needs to be done every time it's edited.
Using a \graphics folder on the root of the drive where the developer is working is sub-optimal.
I don't want the graphics to be outside the project folder structure like that.

Suggestions?
Or even better, has someone done this before?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform