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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report preview looking for images

Status
Not open for further replies.

jimstarr

Programmer
Feb 6, 2001
975
US
I have a report that consists mainly of images. Everything looks fine in the report designer but when I preview the report it issues 4 consecutive "Open" windows as if it can't find some of the images. If I just cancel out of the windows the report then runs and looks fine. Also if I render the report as a PDF (using XFRX) the report runs properly and the Open windows don't appear.

I can't figure out what the report writer thinks it needs. This is VFP9. Any ideas? Thanks!


Jim
 
What are the control sources of the picture / ole bound controls and other controls? If they are setup to image file names and those file names are stored in a table fiels then the OPEN dalogs are asking for these tables perhaps, not the images.

Bye, Olaf.
 
Hi Olaf,

The controls are simply images (.tif) in the PATH. Their names aren't stored in any table.

Today I noticed that the problem doesn't occur when I run the app from an .exe.


Jim
 
If you use a picture /Ole bound control in the report, you have to set 2 things: controlsourcetype (default option selected is image file name) and expression.

Even if the controlsourcetype is set this way, an expression like

imagename.tif is interpreted by VFP as an alias (table, view or cursor) with name "imagename" and a field "tif" in it, which then would have the file name in it.

If you only want to set a literal file name in the expression, you need to set it in quotes, eg "imagename.tif".

Bye, Olaf.

 
But:

1. Why does it find the images at design time but not at run time?

2. If it thinks it can't locate the image files why does it then find them after canceling out of the Open dialogs?

3. There are 14 images on this report. Why only 4 Open dialogs?

4. Why does it run without error as an .exe?

Thanks,
Jim
 
Can't tell you without seeing the report. Phonomenologically the EXE could work better than the source code and report within VFP, as foxpro always looks for files within an exe, while you need to have correct paths and SET CLASSLIB, SET PROCEDURE and such setup in the IDE for files to be found.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top