Jump to content

Output report as a file??


This topic is 6610 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi obesefelinex, and Welcome to the Forum.

Instead of a file save, it is a File Export. FileMaker has several to choose from and each are different enough that you should "Play" with them and see which one fits your needs.

To start with, you should look up the different ones and read about what they are. To do this, you can open [color:"blue"]Online Help (available when FileMaker open). Type or past into the "[color:"blue"]Index" window [color:"red"]file formats, About file formats and then hit the "[color:"blue"]Display "Button"

This will bring up a second [color:"blue"]Window that list the different "[color:"blue"]Formats".

There are a couple you should look at for interaction with Word including.







Link to comment
Share on other sites

I wasn't clear enough. I want to output a formatted report, such as

Country (top sort)

State (2nd)

City (3rd sort)

Borough (4th sort)

data (body)

with each of these sections on a line.

The result is go into QuarkXPress so each section will have its own tag (tags to be part of report being output as a file. I know how to do exports such as .txt and merge, but don't know how to format the output file. If I could output the report to a text file everything would be golden.

Link to comment
Share on other sites

You can lead a horse to water, but you can't make him drink.

The result is go into QuarkXPress so each section will have its own tag (tags to be part of report being output as a file. I know how to do exports such as .txt and merge, but don't know how to format the output file. If I could output the report to a text file everything would be golden.

This makes no sense to me.

Wait a minute, do you mean "[color:"blue"]how to format the output file" as in You have created a report and you want the Export to look like what you have created in FileMaker, with all of the text formatting as in Bold, Italics, etc.

Lee confused.gif

Link to comment
Share on other sites

Hmmm... will the "Summarize By" option work for you? Try sorting your data (in FM) by Country, State, City, Borough, and then when you export, export to any format. On the "Specify Field Order For Export" dialog, near the bottom there is a button to "Summarize by..." Take a look at the result of that and see if it works.

I don't know Quark at all-- are the tags you refer to anything like HTML or XML tags? Your best option may be (again, i'm speaking off the top of my head here) an HTM or XML export.



Link to comment
Share on other sites

Ah, i typed out my first response before reading your 11:02 am post.

I don't think you can get what you're looking for from a simple export. This may be a job for XML. I know Word 2003 has its own XML spinoff (WordML) but i've never worked with it. This may be worth investigating. If you're doing a lot of inter-application work, and it sounds like you are, XML will probably be a good thing to have in your bag of tricks.


Link to comment
Share on other sites

Oops, i'm sorry, i left out a part. You will actually need to create a summary field in Filemaker that sums based on break fields. So if you wanted to count, say, population; and assuming you have a unique ID field for each person (you DO have a unique ID field, right?); make a summary field called populationSum which is equal to the count of UniqueIDField.

Export this field in the export i specified earlier and you should get a tally of all your numbers. Still in very plain text, though.

Getting to your issue: There's no way i can think of to suppress exporting all those fields on the same line. That's just the way the export is designed; it's not really geared towards reporting (as that's something Filemaker handles pretty well all by itself), it's geared towards data transfer.

If you're bent on getting a .doc, i'd again urge you to explore XML options.


Link to comment
Share on other sites

[i've attached both FileMaker 6 & 7 versions. The XSL is the same; it was used to create the 6 file B)-]

Most interesting. This example file shows one way to do it with XML export, using an XSL stylesheet. The problem, as you say, is that FileMaker (and other databases) export a record (or row) as a line. They must do so, or how else would you know where a record ended? (which is pretty important :-)

With XSL it's up to you what the separator is, so it's no problem to use a return instead of a tab between fields, and add an extra return at the end of the record; which is how word processors often organize blocks of data.

The problem is how to get the "summarized" effect. When FileMaker summarizes the export, it does so by leaving the succeeding field blank, if the next record is the same as the first in the summarized block. I'm sure you've seen that.

This means that you end with the returns whether data is there or not, which is not what you want. So you need to test in the XSL to see if the field (column) is blank, and only put a return if it isn't. This keeps the "summarized" data, which are the columns after the first with its parent column.

In the example there's only 2 columns. But the technique could be expanded, with nested If's. I'm going to comment AFTER steps in the text below, and indent with non-breaking space so it will be ugly xml. See the example file for the real thing:

<?xml version='1.0' encoding='utf-8'?>

<xsl:stylesheet xmlns:fmp="http://www.filemaker.com/fmpxmlresult"

exclude-result-prefixes="fmp" version="1.0"


<!-- exclude the "fmp" from the resulting text -->


Link to comment
Share on other sites

If you want to send the data to MS Word, I think rtf files might be the easiest way. You use boilerplate rtf code that sits in global fields, and the field data is merged with it and then it's exported as a tab delimited text file with an .rtf extension. There's an example of this in the Coulombre and Price book. To get the correct rtf formatting code, simply create a document in Word the way you want it to look, using dummy text for the various parts, and save as an rtf file. Then open it in a simple text editor to copy the various formatting code into your FM global fields.

Here is a very simple example that produces a document that has a header, footer and body text each with individual styles:





pardplain{header pardplainpardqc{plainb

This is my header text


}{footer pardplainpardqc{plaini

This is my footer text



This is the first

paragraph of my body text.par This is the

second paragraph.


The nice thing about rtf format is that carriage returns (which Filemaker uses as record separators) are ignored no matter where they appear in the document. Paragraphs are delineated with the 'par' tag. This makes it much easier for Filemaker to combine several records in the output without having to worry about stripping out the returns.

Assuming you stored the various chunks of format code in globals gFormat1, gFormat2,... etc. You could produce a formatted document with this calculation formula:

gFormat1 & MyHeaderText & gFormat2 & MyFooterText & gFormat3 & MyBodyText & gFormat4

Link to comment
Share on other sites

  • 3 weeks later...

Dont know does anyone here prefere plugins but here is one case which brings results.

I did make experiments with "Troi File Plugin 3.0" and its function SetContents. If you use Let function(native FM 7 function) then can set structure on the way you want...might be like this:

SetField[THE_FIELD; Let(

[Top_Sort = Country;

Second = State;

Third = City;

Fourth = Borough;

Body = data (body);

All_Together = Top_Sort &

Link to comment
Share on other sites

That would be fine, except that Obesefeline is working in FM 6.

I think what he wants to do is create a Postscript file...basically check the Print To File checkbox on the Windows Print Screen. I think it can be done using a non-postscript driver of the type that's used in creating PDFs.


Link to comment
Share on other sites


If you are using Office 2003 then you have virtual printer "Microsoft Office Document Image Writer" .

You can choose it as your default printer or save print setting in FMP script.

It creates an Office compatable file and you can insert it to any office document.

Link to comment
Share on other sites

Thanks SteveInVegas, I havent noticed we talk about FileMaker 6 here. So, that what I did say just helps for FileMaker 7. For FileMaker 6 there is "Troi File Plug-in 2.6" and Let function isnt nessesary in this case, formating can be done just like:

SetField[THEFIELD; TrFileSetContents(Top_Sort &

Link to comment
Share on other sites

This topic is 6610 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.