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

Printing picture on report doesn't work

Status
Not open for further replies.

mensud

Programmer
Jul 22, 2001
51
US
Hi,

I have problem in printing reports with pictures on different machines. When I try to print reports, program works correctly on some machines, but on some machines I got only icones with picture name. All tested machines are Windows 2000 Pro, all pictures are on the server.
By the way, I keep these pictures in temporary table in the field of general type. When I open this field in FoxPro sometimes can see the picture, and sometimes I can see only icon. After double click on icon, it is opened another window with this picture but picture has another name, and is created in temp folder of the current user.

Please, any suggestion what could be problem.
Thanks a lot,

mensud
 
I don't know if associated app is the same on all machines.
But, why is that important? I want to print picture on FoxPro report, not to open in anothe app.

Mensud
 
Mostly because Fox doesn't know what to make of the general data if it doesn't know what the associated app is.
I have always avoided general fields like the plague though. Firstly, they grow real big, real fast. Secondly, even moreso than memo fields, they are easily corruptable, and not so easily repaired. Thirdly, as you're finding out, once you add data to a general field, it's not so easily retrieved.
I've found that it's much better to use a character field which contains an image file name, or even a relative path and file name and refer to that in the report, since VFP can display and print a bunch of different image types natively.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
mensud

Dave is right both in his analysis of what's causing your problem and advising you against the use of general fields.

If you read thread184-45672 at the end you will see that the cause of that problem, which was similar to yours, was the Windows associated graphics editor.

FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
OK, but I have one more question.
If I create a character field instead of general field, and put the full path for my picture, how could I retreive a picture? I don't understand

Mensud
 
If you're using it to print, just change the field in your report layout, drop a picture control on your report, then select 'Field' on the 'Picture from' radio buttons. Put the name of your field in there.
It works basically the same way with a form.
You can even use @...SAY:

@ 1, 1 SAY MyTable.Picture BITMAP


-Dave S.-
[cheers]
Even more Fox stuff at:
 
I think the report Picture/ActiveX bound control is for general field only. Am I right? I have the same requirement as Mensud, I setup a text field and stored the path to the image (JPG). But when I run the report, it return an error.
 
Dave/Mensud

You need to select "File" and place the table.fieldname in there. If you select "field" VFP returns a not a general field error.

The path stored in "table.fieldname" must be explicit and include the full path and filename i.e. "C:\pictues\mypic.xxx" or "\\mypc\mypc_c\pictures\mypic.xxx"

NB In network apps, because its possible for any user to append a picture you need to physically pull the picture from its source to a dir on the server and then store the path of the server copy of the pic otherwise a different user's PC will not be able to find the pic file.

Bob Palmer
The most common solution is H2O!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top