Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture in report

Status
Not open for further replies.

MarvinR

Programmer
Oct 29, 2001
37
0
0
HK
In order not to hard-code a logo on a report I use:

- a picture control in report, which the field "Picture
from file" is cLogoName

- cLogoName = 'ABC.bmp'


It worked fine when I tested it in interactive mode, but it showed an "Invalid path or file name" error after I made it to a EXE file;

I tried to copy an ABC.bmp to that directory and all worked fine....

Any idea ?
 
try to build his path because if you don't have abc.bmp in root directory doesn't work
Marius
 
Just had the same problem. I guess that when you build a exe any forms that contains images, the image file is included as part of the exe. Reports on the other hand does not seem to include them so you will get the error "Invalid path or file name" I even try to include the image inside the project before building and still it gave me the same error. So I had to do what you did copy the images over.
 
Try this. Open up the report file (.FRX) and browse it. Locate the record(s) where ObjType = 17 and open the Picture field. Remove the path if there is one in there.

Here's another method I've seen but I forget where:
UPDATE MyReport.FRX ;
SET PICTURE = ["]+JUSTFNAME( ALLTRIM( EVALUATE( PICTURE )))+["] ;
WHERE ObjType = 17


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top