Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print image from a blob field
Message
De
06/12/2012 13:15:07
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00962468
Message ID:
01558963
Vues:
106
J'aime (1)
>>>>with RB 90 the page rendering is done with GDI driver,
>>>>then the image is send to the printer driver.
>>>>This is the big issue with RB 90.
>>>
>>>For your solution with image fields in SQL and blob in VFP can you please outline the exact steps (what do you use in the form that prints it and how your report is set up)
>>>
>>
>>on image you can see a Blob Property expression g_Cache.XX.AZ_Logo_File
>>But you can set a blob field or a blob function ...
>>
>>>Also, are you using RB 80 or 90 for that?
>>
>>RB 90
>>
>>>
>>>Thanks again.
>
>In your case it's expression or variable name. But I have a cursor field the blob field and many rows. Do I still pick the expression?

sorry my mistake.
I forget this old job.

on help you can read
---
Expression or variable name
Specifies that the control source should be an expression or variable that evaluates to:

An image filename.

A non-General character field.

A string literal containing an explicit file name.

An object reference to a form Image object that has its PictureVal property set appropriately.

Tip
The use of an Image object's PictureVal property as a image source in a report is only supported in object-assisted output mode. It will work in backward-compatible mode, in some cases, but results are not guaranteed. For example, in backward-compatible mode, Picture/OLE Bound controls with this source may not respect the Clip sizing option. For more information, see SET REPORTBEHAVIOR Command.
----

It is the image object that render the data.

Then the solution is immediate ( the jpg file added is a report with 10 records )
* create a dynamic image render
DEFINE CLASS printimage AS image

	Height = 17
	Width = 100
	Name = "printimage"

	*-- Repaints a Form or control and refreshes any values.
	PROCEDURE refresh
		LPARAMETERS Pictureval
		this.PictureVal=EVALUATE(m.Pictureval)
		RETURN m.this
	ENDPROC


ENDDEFINE

PUBLIC oimage 
oimage=CREATEOBJECT("PrintImage")

* set Report expression to 
* m.oimage.refresh("cursor.blobfield")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform