main logo
Subject: RE: Formatting for a Memo field - Please Help
Author: "Gordon at Effectnet"
Posted: 2003/01/31 22:25:00
 
View Entire Thread
New Search


Hi Anders & anyone else that can help,

I have tried a memo field and a general field and when I go to preview,
I get the error

"OLE error code 0x8004006d: Object doesn't support lViewObject interface."

When using a general field and when using a memo field get:

Field must be a general field.

I have the rtf text in both fields and need some help with making
the report form preview and print the rich text.

Please help.
Thanks in advance,
Gordon

> -----Original Message-----
> From: profox-admin /at/ leafe .DO.T com [mailto:profox-admin@leafe.com]On Behalf Of
> Anders Altberg
> Sent: Friday, January 31, 2003 2:59 AM
> To: profox /at/ leafe .DO.T com
> Subject: Re: Formatting for a Memo field - Please Help
>
>
> RTF files form the RTF ole control are useusally stored in a Memo of type
> Binary, not in General field. Binary means it's not subject to Codepage
> conversion at any time,
> -Anders
>
> ----- Original Message -----
> From: "Gordon at Effectnet" <gordonsh@effectnet.com>
> To: <profox /at/ leafe .DO.T com>
> Sent: Friday, January 31, 2003 4:23 AM
> Subject: RE: Formatting for a Memo field - Please Help
>
>
> > Hi Cindy,
> >
> > I have already tried this from MS. I could not get it to work.
> >
> > I have a form called receipt and a dbf table called receipt1 with
> > a memo field and a general field. Memo field: receipt General Field
> > receipt1
> > I have an rtf file called receipt.rtf
> >
> > I need to have the report form print the text from the rtf file via the
> > general
> > field in the dbf table.
> >
> > I am unable to append the rtf file to the general field.
> > I tried this command but it does not work.
> >
> > APPEND GENERAL receiptxt1 FROM receipt.rtf CLASS
> "RICHTEXT.RICHTEXTCTRL.1"
> >
> > Any help you can give would be very much appreciated.
> >
> > Thanks in advance,
> > Gordon
> >
> > > -----Original Message-----
> > > From: profox-admin@leafe.com
> [mailto:profox-admin /at/ leafe .DO.T com]On Behalf Of
> > > Cindy Winegarden
> > > Sent: Wednesday, January 29, 2003 8:43 PM
> > > To: profox@leafe.com
> > > Subject: RE: Formatting for a Memo field - Please Help
> > >
> > >
> > > Hi Gordon,
> > >
> > > Here's a KB article with directions.
> > >
> > > HOWTO: Apply Rich Text Effects in Visual FoxPro Reports, 246088. The
> MSDN
> > > online Library is flaky right now, so here's what it says:
> > >
> > > ------------------------------
> > >
> > > Summary
> > > >From time to time it would be good to have the ability to add
> formatting
> > > effects to individual words within Microsoft Visual FoxPro
> > > reports. This can
> > > be accomplished with the Rich Text ActiveX control, a general
> field and
> a
> > > OLE bound control on a Visual FoxPro report.
> > >
> > > More Information
> > > This example shows how to underline parts of a field from a table and
> > > display that formatting on a report. You can apply any effect or
> > > combination
> > > of effects possible in Rich Text to your example.
> > >
> > > Open Visual FoxPro and create a new report.
> > >
> > > Add a Picture/Active-X Bound Control to the detail band of the report.
> Set
> > > its FIELD property to Dcolor.gcolor.
> > >
> > > Save the report as rtfDemo.
> > >
> > > Paste the following code into a new program. Save that program in the
> same
> > > directory as the report, then run it.
> > >
> > > CLOSE ALL
> > > CLEAR ALL
> > > tSafety = SET("safety") &&Store SET status of Safety to a variable
> > > SET SAFETY OFF &&Check to see if the Dcolor table exists
> > > IF FILE("dcolor.dbf")
> > > USE dcolor EXCLUSIVE
> > > ELSE
> > > CREATE TABLE dcolor (dcolor c(20),gcolor g) &&Create and add records
> > > if DColor table doesn't exist
> > > INSERT INTO dcolor (dcolor) VALUES ("Red")
> > > INSERT INTO dcolor (dcolor) VALUES ("Green")
> > > INSERT INTO dcolor (dcolor) VALUES ("Blue")
> > > INSERT INTO dcolor (dcolor) VALUES ("Purple")
> > > INSERT INTO dcolor (dcolor) VALUES ("Orange")
> > > INSERT INTO dcolor (dcolor) VALUES ("Yellow")
> > > ENDIF
> > > _rtfFile = SYS(3)+".rtf" &&Create a legal file name with a .RTF
> extension
> > > *NOTE: The file must have a .RTF extension to work properly
> > > SCAN &&Create a Richtext OLE bound control in the general field of the
> > > dColor table
> > > SET TEXTMERGE TO &_rtfFile NOSHOW
> > > SET TEXTMERGE ON
> > > *!!IMPORTANT!! The following richtext formatting line(s) need to be
> > > *included as one line in your program.
> > >
> > > \\{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcha
> > > rset0 Times New Roman;}}\viewkind4\uc1\pard\f0\fs20The big \ul
> > > <<ALLT(dcolor.dcolor)>>\ulnone dog\par}
> > > SET TEXTMERGE TO
> > > APPEND GENERAL gcolor FROM &_rtfFile CLASS "RICHTEXT.RICHTEXTCTRL.1"
> > > ENDSCAN
> > > SET SAFETY &tSafety
> > > ERASE &_rtfFile
> > >
> > > REPORT FORM rtfdemo PREVIEW NOCONSOLE
> > > USE
> > > CLOSE ALL
> > > When the report is printed, the color is underlined in the text.
> > >
> > > NOTE: In some cases the print preview of RTF formatted text does not
> look
> > > correct. However, when the string is printed, the output is formatted
> > > correctly .
> > >
> > > TIP: To generate a string similar to the one in the above
> code, create a
> > > template for your expression in Microsoft WordPad (or other
> application
> > > capable of creating Rich Text Files). Underline, color, and apply
> > > any other
> > > formatting to your text, then save it to a .RTF file. Open the
> > > .RTF file in
> > > Notepad and copy/paste the Rich Text code into your Visual FoxPro
> program.
> > >
> > > (This application requires the RichTX32.OCX control. Visual FoxPro 3.0
> and
> > > 3.0b do not ship with RichTX32.OCX.)
> > > ---------------------------------
> > >
> > >
> > > Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> > > cindy.winegarden /at/ mvps .DO.T org
> > >
> > > -----Original Message-----
> > > From: profox-admin@leafe.com [mailto:profox-admin /at/ leafe .DO.T com] On Behalf
> Of
> > > Gordon at Effectnet
> > > Sent: Tuesday, January 28, 2003 2:19 PM
> > > To: profox@leafe.com
> > > Subject: RE: Formatting for a Memo field - Please Help
> > >
> > > Hi Garrett,
> > >
> > > Thank you very much!
> > > Now, I have the form, how do I put the rtf text file in a report form?
> > >
> > > Thanks in advance,
> > >
> > > Gordon
> > >
> > >
> > >
> > >
> >
> >
[excessive quoting removed by server]



 
©2003 Gordon at Effectnet
<-- Prior Message New Search Next Message -->