Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code in report
Message
 
To
17/02/2008 09:25:20
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01293004
Message ID:
01293239
Views:
24
Hi Raza

1. CREATE cursor with blob field for your report.
2. INSERT your images in blob field.
3. Create an in-scope reference to an image control:
Image1 = CREATEOBJECT("Image")
4. Create a report form
Add a Picture/OLE Bound report element to the Detail band
Set the Control Source Type to Expression or Variable name
Enter Image1 as the Control Source.
Double-click (or right-click) on the Detail band to get the properties dialog
Select the General Tab.
Enter an On-Entry Run Expression of:
EXECSCRIPT("Image1.PictureVal = YourCursorForReport.NameOfBlobField")
HTH

>Hi Naomi...
>
>I have a similar problem. I have a table with multiple records containing biomatrics signature data in each record. At the printing time I execute the following code:
>
>
>	oSigSign = CREATEOBJECT("SIGPLUS.SigPlusCtrl.1")
>
>	DELETE FILE Signature*.bmp
>
>	WITH oSigSign
>		.OpaqueMode		= .T.
>		.BACKCOLOR		= RGB(255,255,255)
>		.SigCompressionMode	= 1			&& = 0
>		.EncryptionMode 	= 0
>		.ImageXSIze 		= 500
>		.ImageYSize			= 50
>		.ImagePenWidth		= 3
>		.JustifyMode		= 5
>		.JustifyX			= 10
>		.JustifyY			= 10
>		.TabletResolution	= 410
>		.TabletLogicalXsize	= 2000
>		.TabletLogicalYsize	= 600
>		.TabletMode			= 6
>		.TabletType			= 6
>		.TabletXStart		= 400
>		.TabletXStop		= 2400
>		.TabletYStart		= 3500
>		.TabletYStop		= 950
>		.ZoomPower			= 1
>		.ImageFileFormat 	= 1 && Uncompressed BMP
>
>	*	TRY
>			SELECT sign
>
>			.ClearTablet()
>			locFileName 	= "Signature.bmp"
>			CLEAR RESOURCES (locFileName)   && fox from see the last bmp in memory
>			.SigString 	= ALLTRIM(sign.signature)
>			.WriteImageFile(locFileName)
>			llResult = FILE(locFileName)
>	*	CATCH
>	*	ENDTRY
>	ENDWITH
>	RETURN llResult
>
>
>
>
>to create a bitmap such as (signature.bmp) and then I place an ole object on the report to show the signature. It works fine at the command level. Where can I place the code, so it executes for each record during the print of report.
>
>Any help is appreciated.
>
>Thank You in advance
>
>Raza Malik
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform