Solved

Print Text to File

Posted on 1997-04-23
7
309 Views
Last Modified: 2010-04-25
I am using FileMaker Pro to convert a database from one format to another (Dollars and $ense to Quicken). I want to export the DA$ data to FileMaker, process it, and then import it into Quicken. To do this, I need to output a FileMaker report to a text file as opposed to outputting simply the records since I need the formatting. Unfortunately, FileMaker doesn't support this option.

I figure I can use the LaserWriter driver to "Print to a File", but the resulting file has all the PostScript commands in it. What I need is a utility that interprets this file and converts it to it's text equivalent...or an aplication that can do the equivalent, eg MS Word. Then I can use any text editor to manipulate the data into the format I need.

Although my current need is for FileMaker, the same technique could be used for any other application that does not have a "Print to Text" option.

My question is: are you aware of any such application or is there another technique to accomplish the conversion?

Steve Cunningham
0
Comment
Question by:ir000178
7 Comments
 
LVL 4

Expert Comment

by:rifty
ID: 1539783
Steve:  haven't you answered your own question? If you can generate a postscript file, then you can use Word to read it and convert it to text. Have I missed something here?

Cheers,

Rifty.
0
 

Author Comment

by:ir000178
ID: 1539784
rifty: I may be missing something obvious, but if you open a PostScript file with Word, it reads in the raw data and doesn't interpret it. What you get is all the PostScript commands instead of the output they would generate. For example, use Word to Print to a File the single line "Test File". Then open the resulting PostScript file in Word and you get:

%!PS-Adobe-3.0
%%Title: (Microsoft Word - Document1)
%%Creator: (Microsoft Word: LaserWriter 8 8.4.2)
%%CreationDate: (5:05 AM Thursday, April 24, 1997)
%%For: (S. J. Cunningham)
%%Routing: (mailto:\000ir000178@bigfoot.com)
%%Pages: 1
%%DocumentFonts: Times-Roman
%%DocumentNeededFonts: Times-Roman
....
etc, etc, ad nauseam.

I hope I am being clear.

Steve


0
 

Expert Comment

by:molivier
ID: 1539785
Use FMP's export records command and select the tab-separated-text option, and give it a filename - this will export it to a text-readable file without all the postscript junk. You can then edit it in MS Word - and use the find/replace mechanism in Word to convert tabs selectively to get the formatting you want. If your data has tabs in it, use the export comma separated, or quoted.

0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:ir000178
ID: 1539786
moliver writes "Use FMP's export records command and select the tab-separated-text option"

With all due respects, this does *not* give me what I want, as I mentioned in the text of the original question, viz

 "To do this, I need to output a FileMaker report to a text file AS OPPOSED TO OUTPUTTING SIMPLY THE RECORDS since I need the formatting."

If, for example, a FileMaker Report contains Field Labels, exporting to a tab seperated text file will only export the fields, not the labels. I need both and any other textual information that is part of the report.

In addition, even if this would work, it would only solve the problem for FileMaker (which would nevertheless be welcome) and not the general problem as posed.
0
 

Expert Comment

by:molivier
ID: 1539787
Then the only answer is PostScript. Applications like FMP don't have this concept except for via printing. You could use external tools to process the postscript, e.g., postscript -> PDF -> HTML and maybe then pass it thru a utility to strip tags from HTML. Then you'd have the labels and fields w/o the PS.

0
 

Author Comment

by:ir000178
ID: 1539788
While I appreciate moliver's thoughtful response, I beleive it should be regarded as a comment and not as the answer so that the question will remain open.

One thing I plan to try, for example, is using the PowerPrint driver from GDT Softworks. Since it outputs to Daisy Wheel printers and to Dot Matrix printers in draft mode and spools the output, it must generate an intermediate text file someplace.

I hope some of the experts here can come up with something better.
0
 

Accepted Solution

by:
helpmeplease earned 100 total points
ID: 1539789
trying to print then process the file seems like the long way around the problem. Here's the solution:
create a new calculation field in Filemaker eg:

First Name & "  " & Last Name & "," & Company & "¶"
make sure the result of the calculation is text

This way you preformat the given text the way you want it in Filemaker. Notice how within the quotes you can add punctuation and spaces as required and all items are seperated by the &. I also like to use a return on the end to help in formatting if your going to use a tab in the field but it's not necessary if your not using any tabs to seperate data.

Next export as tab seperated text just the new calculation field you created.

The only formatting you have to do now in a word processer is a find change. Just find all tabs and replace with returns. Now this is where the return in the calculation comes in handy, if there are other tabs in each line just find return+tab and replace with a return.

Oh, by the way the result of the calculation should be text even if some of the fields used in the calculation are numbers.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Yesterday Apple introduced their revolutionary new iOS 5 operating system that claims to be the ultimate mobile technology interface. One of the biggest innovations of the new operating system is the introduction of the iCloud computing network. Thi…
Are you looking to clear some space on your phone for the latest iOS 8 update? Did you switch to Spotify so you no longer need to keep music native on your phone? Run out of space for taking photos while in the middle of vacation? Sometimes the quic…
Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question