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

In Windows 7 my BMP file doesn't displays on a report

348 views
Skip to first unread message

Michael Fechter

unread,
May 18, 2010, 2:06:01 PM5/18/10
to
Let me start with "I know, I know General fields should not be used".

My report works fine on Windows XP, but on Windows 7 it simply displays a
small 1/3" line instead of the BMP image.

Here is my code that I am testing with that has helped me identify the
problem:
1. Create Cursor cur_image(gPic g)
2. APPEND BLANK
3. APPEND GENERAL gpic FROM "C:\Temp\Test.bmp"
4. BROWSE

In XP when I browse and open the General field, I get the image.
In Windows 7 I get an icon. I then must click on the icon I get the image.

I believe Windows 7 is doing the same thing when I run my report.

Does anyone have any helpful advice to get it to work on Windows 7?

Thank you,

Mike Fechter

Dan Freeman

unread,
May 18, 2010, 5:25:49 PM5/18/10
to
Yes, this is *why* you shouldn't use general fields. <g>

VFP doesn't do any of the displaying when it comes to general fields.
That is handed off to the Windows ooze where Windows yells "Hey! Who
owns this type?" and whatever software answers is expected to do the
display. As you're seeing, they don't all do it the same way.

You can either muck around with installing other programs hoping one of
them will display your bmp properly, or don't put it in a general field
in the first place. (Put it in a memo field and copy it to disk as
needed. VFP can display BMP files natively!)

Dan

Michael Fechter wrote :

Michael Fechter

unread,
May 19, 2010, 10:02:01 AM5/19/10
to
Dan,

Thanks for the information. I hope you can help me further.
I want to put a logo on a report. It will be dynamic and change with each
customer. I store the logo filename and path in my customer record and simply
read it when I print my report.

1) I put the logo on the report using the OLE Picture/Active X control.
2) I can get the picture from a "File" or "Field" (must be a General field).

I mentioned in my previous post the problem using the "Field" option.
The problem I run into when using the "File" option is, the picture doesn't
dynamically change when I print for a different customer. It prints the same
one for everyone! We speculate that it gets compiled into the report.

Question:
a) Does my appoach sound correct?
b) Is there another way to do it?
c) You mention a memo field, but I'm not sure how I would use it.
d) Is there a way to flush out the image so it will display the new one?

I'm toying with the idea of compiling the report outiside my project with
the hope that it would pull in the logo properly when printing. But this
creates it's own set of issues!

Thank you,

Mike Fechter

Dan Freeman

unread,
May 19, 2010, 11:44:52 AM5/19/10
to
What you describe is certainly not a new requirement. People have been
delivering applications with this functionality for years.

But without knowing how you are doing the deed nobody can see where
you're going wrong. Not enough information. Sorry.

Dan

It happens that Michael Fechter formulated :

Michael Fechter

unread,
May 19, 2010, 4:35:01 PM5/19/10
to
What more would you like? I thought I summarized it pretty good.

Thank you,

Mike Fechter


"Dan Freeman" wrote:

> .
>

Jürgen Wondzinski

unread,
May 21, 2010, 5:15:31 AM5/21/10
to
Hi Michael

The problem is that VFP caches the bitmap between the different records,
thus you will always only see the first one. You need to do a CLEAR RESOURCE
between each record to get the new one.


--

wOOdy
Visual FoxPro Evangelist
Microsoft "Most Valuable Professional" 1996 to 2009

"*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
..·`.Visual FoxPro: It's magic !
(¸.·``··*

0 new messages