Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report from REPORT FORM containing graphics

Status
Not open for further replies.

SSDESIGN

Programmer
May 11, 2003
71
US
Running a report containing a graphic box around some data.
Graphics printed when the report was printed to LPT3 and to screen. When output to a text file, the box was showed in ASCII characters. When the text file was opened in the editor, the ASCII box would appear in graphics.

How can I make the text file display the graphic characters so I may use the text file as an attachment?

Thanks for the support...
 
"output to a text file"

The definition of a text file is that it only contains text characters (ASCII characters) such as you would find in a Notepad document.

It is not intended to support graphics.

If you want your Report Form output to contain more than just text, then you need to output to another form of document.

One suggestion would be to output to a PDF file. This could display your Report Form layout of the data as well as any graphics which your Report Form might contain.

You might want to look at my suggestion on another recent posting (thread182-1570763) to see how you might use a Windows PDF Print Driver.

Good Luck,
JRB-Bldr


 
Thanks for the heads up....

However, with an extended ASCII code, you would have as an example the following codes:

ASCII Description
218 Upper left corner - single line
200 Bottom left corner - double lines.

As a result, with the extended code, graphics are printed just as numbers, punctuation, and letters are printed.

So the question becomes 1) where may I find an font containing extended graphic characters, and 2) how do you set up REPORT FORM so that when a text file is created, the extended font is used for the text file containing graphics characters...

Thanks for the reply...
 
I'll leave the finding of the font to you.

However once you have found the font and installed it onto the specific workstation(s) which will generate the report, utilizing the font is easy.
You only need to MODIFY REPORT MyRpt and change the Font property of the various desired Report Form objects to your desired font.
Whether the resultant Text file will be as expected or not will still need to be verified.

I might suggest that you run a test in one of the applications in which you expect a user to 'read' the text file. Remember that a text file with a .TXT extension will typically default at the recipient's end to Notepad to open and read it. And if THEY do not have the special font installed, THEY may not see the same results.

Try manually creating a mock-up of your file utilizing this previously installed extended ASCII font where desired.

Save and close the document.

Email the document to someone who does not have the special font installed or just go to another workstation without the font and let them open the file.

See if THEY get the anticipated results.

If so, great.
If not, then plan on falling back to an alternate approach.

Good Luck,
JRB-Bldr
 
Just an update….

Developed a report with graphics using Report Writer.
Run the report to the screen – graphics could be seen.
Ran the report to the printer – graphics could be seen.
Ran the report to a text file – ASCII was used in place of the graphics when viewed with notepad.

Loaded the text file into a memo area, edited the memo area, and graphics could be seen.

Opened the text file in Microsoft Word, selected the ‘OEM United States’ font and the graphics could be seen. However, the file could not be saved.

So, the question is how can you select the font that FoxPro DOS uses when writing to a text file?

How about the resource file – FoxUser.dbf? Does it specify the font????

Any additional suggestions would be appreciated.
 
So, the question is how can you select the font that FoxPro DOS uses when writing to a text file?

You can't do this. A text file is a text file is a text file and it holds nothing but text. The font you see is defined by the program that opens it. If I open a text file in Notepad it comes up as Courier New 12 pt. If I open it in FoxPro it comes up as Lucida Console 10 pt.

Geoff Franklin
 
"Loaded the text file into a memo area"

I assume that you mean that you loaded the text file contents into the Memo field of a DBF file?
Why would you do that?

You certainly do not need to do that just so you can send the text file that you created as an Attachment.

And, before you go much further, have you verified how the file appears when opened on a workstation which does not have the 'OEM United States' font installed?

If you want users to edit this text file, then it should be done either:
* Before you originally create it
or
* By some tool other than FoxPro DOS.

If you want users to have access to the text file, save the fully pathed filename in a field in the DBF file and 'point' users to it - not the file contents.

Maybe we don't totally get what you are trying to accomplish, but it seems like you are possibly heading down the wrong path or an un-supported one.

If you want Graphics you might want to consider like I first suggested, create a PDF file or use FRX2Word instead of a text file. And don't try to save the file contents in a Memo field.

Good Luck,
JRB-Bldr
 
Hi...

The movement of the text file to a memo field was only a test to see if the graphics reappeared which they did...

From the testing, I'm looking for a generic font that is available on Window machines which has the correct graphics ASCII codes. At this time, I've not found one...

So, I'm now working with PDF995 to use a command line to convert the text file over to a PDG with graphics...

And away we go....

Thanks for the support....
 
Just an update...

I have stopped looking for a Foxpro font containing graphics on the basis that if I found one, it would not be available on the computer receiving the file - i.e. the graphics would not be displayed.

So, I'm now running the text file from Foxpro REPORT generating a .TXT file. Then using ConvertDoc.exe from within the Foxpro DOS application, I convert the .TXT file to a .PDF file using the aSwift Mono 437 font available from Windows through the ConvertDoc.exe template. Then, when necessary, I rename the file. Having done this, the file can now be used as an attachment to an email with everyone seeing the graphics.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top