Solved

Sequential pring with out page feed

Posted on 2004-09-08
8
197 Views
Last Modified: 2010-05-02
When writing a large program, I am in the need to follow the sequence of events. Now I know I can do it  through the debug command. What I would like is to the print text to the Cannon Parralel inkjet printer, without a page feed after each print command.
y = 1
D = 2
X = y + 1
z = d + 2
Printer.print "z = "; "z"
D = X + Z
PRINTER.PRINT "D = "; D


THE TEXT WOULD APPEAR ON THE SAME PAGE AS:

Z = 4
D = 7
0
Comment
Question by:gonzal13
  • 4
  • 3
8 Comments
 
LVL 4

Assisted Solution

by:frankd
frankd earned 25 total points
ID: 12011295
Hi,

When ever you want a form feed add the command Printer.EndDoc.  That will print everything to the printer that you queued up using Printer.Print

y = 1
D = 2
X = y + 1
z = d + 2
Printer.print "z = "; "z"
Printer.EndDoc
D = X + Z
PRINTER.PRINT "D = "; D
Printer.EndDoc

With the above code you would get two pages printed.

Hope this answers your question.

Frank
0
 
LVL 13

Author Comment

by:gonzal13
ID: 12012497
I do not want a form feed. All I want is a line feed after each print command. What I get now is a page per line.

gonzal13(joe)
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 25 total points
ID: 12017466
Actually there's a NewPage method that the printer should wait for before throwing the page. EndDoc tells it to start printing.

I've just tried in on my Epson and it works the way that you need yours to. Does the printer work OK otherwise?
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12019171
Hey, Joe.

Glad to help, but what was the problem?
If it was that you just hadn't tried it, then I hope you now have more confidence to experiment.

We're all here to learn.

Cheers, Graham
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12019246
Incidentally, the usual way to store debug info is to write it to a log file. There are some App.Log.. methods, but they only work with compiled applications. Otherwise you can write them to a text file using 'Open... For Append .. '
0
 
LVL 13

Author Comment

by:gonzal13
ID: 12019592
The first time I tried it, for some reason it printed one line per page. I got flustered and thus asked a question.

What I am doing is trying to rewrite a program I wrote in Darthmouth basic, would you believe in 1980 which consisted 25 feet of code into visual basic. Thus by printing out the important text, it is easier to look at than just using a debug routine. For one thing, I had not put enough remarks on the original, thus with a print out I can spot logic errors due to typos. The program worked back then. Unfortunately I do not have the final copywrited print out.


It was programmed on an APPLE II. I obviously ran into memmory restrictions. I got around it by saving the variables and just changed out floppies to continue the program.

Besides I want to learn Visual basic and this is a fairly good way to do it.
0
 
LVL 13

Author Comment

by:gonzal13
ID: 12019625
Frankd:

I will  need your command for a page feed.

Thanks
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12019795
Well, young Joe,

If Frankd doesn't come back, it's the method that I mentioned, Printer.NewPage.
 
The things we had to do...

I was retired earlier this year at the U.K. male statutory retirement age, though I hadn't seen any Basic until the mid 80s.

Actually, I believe that this sort of stuff belongs to the Lounge area, but I don't usually look there.

Cheers, Graham

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question