Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: james james
  Where is james james?
 
 Singapore
 james james
 Tags
Subject: RE: Append JPEG file to general field
Thread ID: 233279 Message ID: 233294 # Views: 27 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Wednesday, July 01, 2009 9:42:12 AM         
   


> > Hi James,
> >
> >
> > Oh I see, that sounds like a good approach to me.
> >
> >
> > The FileToStr() function would return the entire file stream so that you can store the result string where ever you want
> >
> > Create Cursor reportCursor (fileContent Memo NoCpTrans, fileName C(250))
> > Local lcFile
> > lcFile = GetPict('jpg')
> > Insert Into reportCursor Values ( FileToStr(m.lcFile), m.lcFile )
> > 
> > * and later, perhaps you want to recreate the file / save the content back to disc:
> > StrToFile(reportCursor.fileContent, 'x:\some\folder\newfilename.JPG')
> > 

> >
> >
> > However, in your case you might not even need to do so but rather use the "Expression Or Variable Name" option for the Control Source Type and your field name containing the full-path in the properties dialog of your OLE Bound Image control in the report?
> >
> >
> >
> > hth
> > -Stefan
>
> Hi Stefan,
>
> Thanks, your suggestion to use "Expression Or Variable Name" in the report works fine when I use VFP 9.0.

You are welcome.

> VFP 8.0 does not have that properties setting.

In Vfp8, you can choose Picture From "File" in the properties dialog of the report's image control, and then put yourAlias.yourField in there



hth
-Stefan



COMPLETE THREAD
Append JPEG file to general field Posted by james james @ 7/1/2009 7:14:40 AM
RE: Append JPEG file to general field Posted by Stefan Wuebbe @ 7/1/2009 7:20:35 AM
RE: Append JPEG file to general field Posted by james james @ 7/1/2009 8:15:50 AM
RE: Append JPEG file to general field Posted by Stefan Wuebbe @ 7/1/2009 8:31:25 AM
RE: Append JPEG file to general field Posted by james james @ 7/1/2009 9:15:47 AM
RE: Append JPEG file to general field Posted by Stefan Wuebbe @ 7/1/2009 9:42:12 AM
RE: Append JPEG file to general field Posted by james james @ 7/1/2009 12:40:37 PM