Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Relative path to graphics files
Message
From
23/06/2005 17:45:48
 
 
To
23/06/2005 13:14:38
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 7 SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01025935
Message ID:
01026078
Views:
22
In my reports that use graphics, I use a variable to store the path and filename of the image. The variable is built just before the report is REPO'd. For example: lreportjpg=sys(5)+sys(2003)+'\mypic.jpg'

HTH

>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform