Your code works fine ..
But what i want is slightly different to this case.
For your info, each time a transaction has been done, i want it to print at 1
line. So we will never know when to call the System.CloseFile(MyFile) function
.
For example, each time a purchase is done, i want the system to print a line of
purchase information such as customoer name, price etc ...
Vahan Yoghoudjian <[EMAIL PROTECTED]> wrote:
If you want to print only plain text exactly like you told, you can open
the printer port and write directly into it
procedure TForm1.Button1Click(Sender: TObject);
var
MyFile: TextFile;
begin
AssignPrn(MyFile);
Rewrite(MyFile);
for i := 1 to 5 do
Writeln(MyFile, (Format 'This is Line %d',[i]));
System.CloseFile(MyFile);
end;
Vahan
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of soonhuat ong
Sent: Tuesday, August 02, 2005 10:45 AM
I want a free component that can help me to print the data line by line as
the following example:
var myprintstring : String;
for i := 1 to 5 do
begin
myprintstring := 'This is Line ' + IntToStr(i);
// Print data here
end;
So the output will looks something like this:
Output
-------
This is Line 1
This is Line 2
This is Line 3
This is Line 4
This is Line 5
Anyone can help me out ?
---------------------------------
Start your day with Yahoo! - make it your home page
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
----------------------------------------------------------------------------
----
YAHOO! GROUPS LINKS
a.. Visit your group "delphi-en" on the web.
b.. To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
----------------------------------------------------------------------------
----
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
SPONSORED LINKS
C programming language Computer programming languages The c programming
language C programming language List of programming languages Delphi programmer
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "delphi-en" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12h7k7669/M=362131.6882499.7825260.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1122986197/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/