bold part of a memo field when printing 
Author Message
 bold part of a memo field when printing

Hello!  I have a request from a client to highlight (bold)
part of a memo field on a report.  The report is generated
as a result of a full-text search that includes a memo
field.  It is sometimes difficult for the client to
determine why the record was selected in the search if the
match is found in the memo field so they would like for the
search term to be printed in bold when it is found in the
memo field. (Similar to what you see when you search for a
term from within help)  Is there a way to do this without
coding the report by hand?

Thank you for your input,
Becca



Sun, 31 Oct 2004 11:07:55 GMT  
 bold part of a memo field when printing
No can do.  A memo field is one big string so you can not bold just part of
it.

--

Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.


Quote:
> Hello!  I have a request from a client to highlight (bold)
> part of a memo field on a report.  The report is generated
> as a result of a full-text search that includes a memo
> field.  It is sometimes difficult for the client to
> determine why the record was selected in the search if the
> match is found in the memo field so they would like for the
> search term to be printed in bold when it is found in the
> memo field. (Similar to what you see when you search for a
> term from within help)  Is there a way to do this without
> coding the report by hand?

> Thank you for your input,
> Becca



Sun, 31 Oct 2004 15:37:58 GMT  
 bold part of a memo field when printing

Quote:
> Hello!  I have a request from a client to highlight (bold)
> part of a memo field on a report.

Becca, as Fred said, you can't do this in a VFP report. Perhaps Crystal
reports can do it - but I don't know enough about Crystal to be sure.

An alternative is to automate Word for your report.

--

Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP

http://msdn.microsoft.com/vfoxpro  http://foxcentral.net



Mon, 01 Nov 2004 10:17:57 GMT  
 bold part of a memo field when printing
I have used a rich text control which worked well. I used windows write to
get the RTF codes.

If you do use the rich text control don't forget you need to distribute the
ocx file.

John


Quote:
> Hello!  I have a request from a client to highlight (bold)
> part of a memo field on a report.  The report is generated
> as a result of a full-text search that includes a memo
> field.  It is sometimes difficult for the client to
> determine why the record was selected in the search if the
> match is found in the memo field so they would like for the
> search term to be printed in bold when it is found in the
> memo field. (Similar to what you see when you search for a
> term from within help)  Is there a way to do this without
> coding the report by hand?

> Thank you for your input,
> Becca



Wed, 03 Nov 2004 05:09:02 GMT  
 bold part of a memo field when printing
Hi,
   How to insert the RTF block to vFoxPro 6.0 Report ?
Dominic


Quote:
> I have used a rich text control which worked well. I used windows write to
> get the RTF codes.

> If you do use the rich text control don't forget you need to distribute
the
> ocx file.

> John



> > Hello!  I have a request from a client to highlight (bold)
> > part of a memo field on a report.  The report is generated
> > as a result of a full-text search that includes a memo
> > field.  It is sometimes difficult for the client to
> > determine why the record was selected in the search if the
> > match is found in the memo field so they would like for the
> > search term to be printed in bold when it is found in the
> > memo field. (Similar to what you see when you search for a
> > term from within help)  Is there a way to do this without
> > coding the report by hand?

> > Thank you for your input,
> > Becca



Sat, 06 Nov 2004 11:58:42 GMT  
 bold part of a memo field when printing
Read this:
------------------------------------------------------------------
HOWTO: Apply Rich Text Effects in Visual FoxPro Reports

The information in this article applies to:

Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a, 6.0
on the following platforms: NT, Win95, Win98

----------------------------------------------------------------------------
----

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\fcharset0 Times New Roman;}}\viewkind4\uc1\pard\f0\fs20
          The 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.)

Good Luck.
--
--
Emiliano
ICQ:34013175
Rosario-Santa Fe
Argentina.



Wed, 10 Nov 2004 05:01:32 GMT  
 bold part of a memo field when printing
Hi,

   It seems to me a little complicated.  Anyway it does the job.   I just
wonder that RTF is so popular in windows' environment.  Why does vfp report
designer provide no support on it?  Does Microsoft really want to give up
vfp?

Dominic


Quote:
> Read this:
> ------------------------------------------------------------------
> HOWTO: Apply Rich Text Effects in Visual FoxPro Reports

> The information in this article applies to:

> Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a, 6.0
> on the following platforms: NT, Win95, Win98

> --------------------------------------------------------------------------
--
> ----

> 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\fcharset0 Times New Roman;}}\viewkind4\uc1\pard\f0\fs20
>           The 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.)

> Good Luck.
> --
> --
> Emiliano
> ICQ:34013175
> Rosario-Santa Fe
> Argentina.



Tue, 16 Nov 2004 12:35:25 GMT  
 bold part of a memo field when printing
< ... >

Quote:
> Does Microsoft really want to give up
> vfp?

keep cool... ;)


Tue, 16 Nov 2004 21:27:15 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Under Line or Bold in a Memo Field

2. font bold won't go bold ?

3. FPW2.6 - printing & print preview - memo fields

4. Printing to printer only prints part of first line

5. change font of fields to bold

6. How to print bold characters?

7. Printing a Memo Field

8. Printing Large Memo Fields (Bombing)

9. Printing long memo fields in FPMac

10. Printing memo field from report form

11. Printing large memo fields > 1 page

12. Printing Memo Fields

 

 
Powered by phpBB® Forum Software