Toggle navigation
ReportBuilder Support Forums
Categories
Discussions
Activity
Sign In
Home
›
Devices
ReportBuilder 22.06 now available including Delphi 12.2 support!
New Blog Posts: Merging Reports -
Part 1
and
Part 2
TExtraDevices ==> PrinterFile
rbuser
November 2002
edited November 2002
in
Devices
Hello,
Does anyone have any pointers on how best design a report for accurate
PrinterFile ?
Should I care about font type & size? What would be a good average font
size?
Any input would be GREATLY appreciated.
Thanks,
Isi R.
Comments
rbuser
November 2002
edited November 2002
Just design the report usning the same lines per inch and characters per inch
you specify in the component options. Font size should fit within a single line.
Jim
digitalmetaphors
November 2002
edited November 2002
Take a look at the main reports demo #107. It prints to a report emulation
text file. You can then send this text file to your dot matrix printer.
Cheers,
Jim Bennett
Digital Metaphors
-----------------------------------------------
Tech Tip: Send TextFile to Printer
-----------------------------------------------
I designed a application that exports the report to a .txt
file using ReportTextFile device.
How can I Send the text file to the printer?
The following procedure will send the .txt file to
the printer using Delphi's TPrinter object.
uses
Printers;
procedure SendTextFileToPrinter(aFileName: String);
var
lsLines: TStringList;
lOutputFile: TextFile;
liIndex: Integer;
begin
lsLines := TStringList.Create;
try
lsLines.LoadFromFile(aFileName);
AssignPrn(lOutputFile);
Rewrite(lOutputFile);
for liIndex := 0 to lsLines.Count-1 do
Writeln(lOutputFile, lsLines[liIndex]);
CloseFile(lOutputFile);
finally
lsLines.Free;
end;
end;
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors
http://www.digital-metaphors.com
Digital Metaphors Corporation
http://www.digital-metaphors.com
info@digital-metaphors.com
This discussion has been closed.
Comments
you specify in the component options. Font size should fit within a single line.
Jim
text file. You can then send this text file to your dot matrix printer.
Cheers,
Jim Bennett
Digital Metaphors
-----------------------------------------------
Tech Tip: Send TextFile to Printer
-----------------------------------------------
I designed a application that exports the report to a .txt
file using ReportTextFile device.
How can I Send the text file to the printer?
The following procedure will send the .txt file to
the printer using Delphi's TPrinter object.
uses
Printers;
procedure SendTextFileToPrinter(aFileName: String);
var
lsLines: TStringList;
lOutputFile: TextFile;
liIndex: Integer;
begin
lsLines := TStringList.Create;
try
lsLines.LoadFromFile(aFileName);
AssignPrn(lOutputFile);
Rewrite(lOutputFile);
for liIndex := 0 to lsLines.Count-1 do
Writeln(lOutputFile, lsLines[liIndex]);
CloseFile(lOutputFile);
finally
lsLines.Free;
end;
end;
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
http://www.digital-metaphors.com
info@digital-metaphors.com