Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BMP Image in Reports using General Field & the Picture Control

732 views
Skip to first unread message

M Moore

unread,
Feb 28, 2003, 8:30:05 AM2/28/03
to
I add image to my table with the following code
APPEND GENERAL <general field> FROM <BMP File>

On some machines, I Preview or Print the report and the images print just
fine.
On other machines, when I preview or print, the image doesn't show up, but a
file name does show up.

I have seen were some 3rd party graphics packages have changes how BMP's are
editing via exporer. Those few packages allowed us to remove the
association of the BMP file from the package.

We are still having some issues with some WIN98 machines printing images.
There was a 3rd party graphics packages installed, but was removed.

If anyone has any idea on what/how vfp communicates with OLE and the BMP to
print or display it in preview, I need you help.


TIA
Mark Moore


Rick Bean

unread,
Feb 28, 2003, 9:05:05 AM2/28/03
to
Mark,
One "problem" with General fields, is that the OLE Server that stored the data in the field is also
required to retrieve the data. So if you don't have the same program installed on the 'viewing'
machine, it won't extract the data. I ran into this first back in FPW when switching between Win3.x
and Win95 with .BMP files - it was a PBRUSH.EXE vs. MSPAINT.EXE problem!

This is one reason that it's usually recommended that you just store the path and name of the file
in your table - not the file. If you must store the file, use a "generic" technique like FILETOSTR()
and STRTOFILE() into/out of a Memo field.

Rick

"M Moore" <mmo...@ntsdata.com> wrote in message news:OSz7a3y3...@TK2MSFTNGP09.phx.gbl...

Ed E.

unread,
Feb 28, 2003, 9:09:19 AM2/28/03
to
> On some machines, I Preview or Print the report and the images print just
> fine. On other machines, when I preview or print, the image doesn't show
up, but a
> file name does show up.


I personally can't believe that Microsoft hasn't fixed this, but they
haven't. It has been around for several years.

To get around it:
1> Create a table or cursor with the file name in a field (character or
memo.)
2> Create a report and place a picture control on it.
3> In the Filename box (not field name), give it your field name.

It should now appear as you expect. Unfortunately, you aren't able to
programmatically store the actual image in a table reliably. Opening the
image up in an image editor then copying and pasting into the general field
works but APPEND GENERAL doesn't.


Lee Mitchell

unread,
Feb 28, 2003, 9:44:54 AM2/28/03
to
Hi Mark:

Rick's explanation and workaround are correct. I would like to add one
thing. You might need to use a CLEAR RESOURCES command to make sure you
flush the cache and see the most recent bitmap image. For more
information, see:

155388 PRB: CLEAR RESOURCE Does Not Appear to Work
http://support.microsoft.com/?id=155388

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

M Moore

unread,
Feb 28, 2003, 9:42:11 AM2/28/03
to
well, i would love to do that, however, we don't store the images on the
drive. We store the images in a memo field with FILETOSTR() method. When
we want to use the image, we create one file at a time, we call STRTOFILE()
method. I will have to come up with something that will allow me to change
this and see if this fixes the problem.

Thanks anyway.

Mark

"Ed E." <EdE...@NetZero.MyPants.com> wrote in message
news:v5urcgb...@corp.supernews.com...

Lee Mitchell

unread,
Feb 28, 2003, 10:30:09 AM2/28/03
to
Hi Mike:

I like your idea of using the FileToSrt() and StrToFile() functions. I
don't know if this article will help you in developing a workaround, but I
am sending it to you in the hope it decreases your time spent on creating a
workaround.

161832 HOWTO: Export an Embedded .bmp Image into a File
http://support.microsoft.com/?id=161832

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

Ed E.

unread,
Feb 28, 2003, 1:48:44 PM2/28/03
to
Hello, Lee.

Is there some way to send VFP bug reports to Microsoft without having to pay
for tech. support? I do have an MSDE subscription, but there are some bugs
in VFP that I've encountered over the years that don't seem to go away. I'd
hate to burn up my tech. support issues just to receive a "workaround" which
doesn't really fix the root problem.


Lee Mitchell

unread,
Feb 28, 2003, 2:17:16 PM2/28/03
to
Hi Ed:

You can use the web link in this article to report a bug:

310179 INFO: How to File a Bug Report for Visual FoxPro
http://support.microsoft.com/?id=310179

If you want to submit a product wish, go to www.universalthread.com,
choose VFP Zone from the main menu, and pick Visual FoxPro Wish List from
the dropdown list.

I hope this helps.



This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

Ed E.

unread,
Feb 28, 2003, 2:47:45 PM2/28/03
to
Ok - thanks.


0 new messages