Print to text file - N/G
I've been away from ReportBuilder for a while, and must have forgotten
something fundamental . I'm trying to print to a text file to
generate a data file for input into another system. I have the following
property settings:
allowprinttofile - true
devicetype - textfile
modalcanceldialog - false
modalpreview - false
textfiletype - ftFixedLength
and I specified the text file name.
When I run this report, I get a 0-byte output file. When I change the
device to screen, I get the expected results displayed.
Can anyone tell me what I am doing wrong?
Thanks
something fundamental . I'm trying to print to a text file to
generate a data file for input into another system. I have the following
property settings:
allowprinttofile - true
devicetype - textfile
modalcanceldialog - false
modalpreview - false
textfiletype - ftFixedLength
and I specified the text file name.
When I run this report, I get a 0-byte output file. When I change the
device to screen, I get the expected results displayed.
Can anyone tell me what I am doing wrong?
Thanks
This discussion has been closed.
Comments
So now I can get the report into a file, but the format is a problem. I'm
trying to create a fixed-length data file with a header
record. It looks like this:
H 19970904
9876ABAB ABS ABRC 6.5 101598 090993 19981015C
The first line is a header record, and the second line is a sample of the
detail data. Each detail field has to begin in a specific
column.I selected a fixed font, Courier, and put the header record info in
the header band.
However, now if I set the textfiletype to Fixed Length, I again get an empty
file. If I set it to custom, I get all records on one line. How can I
generate the report I need?
Thanks.
should create the "columns" in the file that you are looking for. This is a
report emulation text file output.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
skipped after each 2 records.
page in 1/6 inch increments. See the main reports demo #107, as it uses
this approach to print specifically for the report text file output.
Courier is good. What point size are you using? Try using Courier New 8pt.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
false for evey page after. The fixed length file device output is really
what you should probably use, but it sound sas if the report emulation text
file works also. You have to set the SaveLength property on each component
that prints to the file in order to print that many characters in the file.
You can set the header band's visibility in the Report's OnStartPage event.
If the Report.AbsolutePageNo = 1 then set the headerband to visible = true,
else = false.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
instructions right away.
Happy New Year.