At 12:28 AM 4/30/2005, Tom Hawley wrote:
Turns out I spoke too soon: the problem seems to
be with type TEXT and not with the path. Report
Emulation Text File works as it should; Text file
does not. Type Text always writes a zero length
file.
What is the intended difference between these two
types? There appears to be no discussion of this
in the documentation.
Tom,
In order to PRINT the report as "Text File", first you need to
identify the "Band" to be included for text file. If there is
no band defined, you are going to get the zero byte file.
Here's how to use the "Print to Text File Setup ..." :
01. Report Designer | File | Print to Text File Setup...
Notice the following options:
File Name:
File Type:
Bands:
Available Controls, Select Controls, Save Length
02. Select the File Name: (Click on [File] Button
Example: TestFile.TXT
03. Select File Type: Fixed Length
Options: Comma Delimited, Tab Delimited, Fixed Length
04. Select Band: Detail
05. Select Column(s) from the list of Available Controls
06. Customize each selected column and make sure to define Length
(Save Length).
07. Click on [OK] button to save these settings when using
Print to Text File.
Along with other report settings, these settings will be saved
with the report.
Repeat step 06 to define the length for each column, if necessary.
All of these property settings prepare the report to be printed to
a text file.
08. While still in Report Designer, Select Report Preview.
Click on "Printer" icon
Check "Print to File" Option
You'll notice the Type "Text" and the Text File Name as defined
in Step 02 above.
The print dialog will then display a Print to File CheckBox and
File... button (so the user can change the file name specified in
the Text File Name property.)
Click on [OK] button to print the file as TEXT.
09. Close the Report Designer or simply Click on R> Prompt icon from
the Tool Bar.
10. At the R> Prompt, type:
DIR TestFile.TXT
Notice the size of TestFile.TXT file.
To view the entire text file, type:
LAUNCH TestFile.TXT
Take a look at the File using MS NotePad.
That's all there is to it!
11. To automate the entire printing process, use:
PRINT ReportName WHERE ... ORDER BY ... OPTION TXT
This will allow the report to print to a text file without
user intervention,
The report will print to the filename specified in the
Text File Name property, but the Print Dialog will not display
the Print to File CheckBox or File... button.
For complete details on PRINT command:
From The Edge: http://www.razzak.com/fte
Topic: Using Enhanced PRINT Command in R:BASE 7.x for Windows
12. Got R:Docs?
Let the R:Docs help you define the entire PRINT Syntax for you.
13. Take a look at the sample application to demonstrate the use of
Printing Report to Text File.
http://www.razzak.com/SampleApplications (Item 002)
Enjoy and make sure to have fun!
Very Best R:egards,
Razzak.