Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a specific number of lines without advancing to a new page 1

Status
Not open for further replies.

sonper

Programmer
Oct 4, 2001
94
PH
Hi guys!
I'm printing on a pre-printed form which is half the size of a letter paper size (portrait). Two forms occupy one 8.5" x 11" paper. What I need to do is after printing to the first form, the printer will advance to the second form which occupies the other half of the 8.5" x 11" paper. How can I customize the size of the paper to be used for printing? Anybody here has an idea?

I'm using VB6 and an Epson LX-300 dot matrix printer
 
chelseatech,

I'm newbie with Crystal and not so familiar with handling formulas and variables. Can you please give me example of how can I use formulas and variables to keep track of lines printed?

I'm using CR7 and VB6.
 
Rather than fiddling with line numbers etc (which isn't accurate because of font sizes anyway, just size the details section to be the same size as the form you are printing on.
 
Try <Printer Setup> on the file menu, tell it exactly what sort of form it is supposed to be using. You can set your own values if there is nothing on the list that quite matches. Madawc Williams
East Anglia
Great Britain
 
Madawc,
There's nothing in the <Printer Setup> that prompts me to set up my own values. All I can see there is a list of pre-determined paper sizes like A4, A5, B5, Fanfold, Legal & Letter. Are you also using CR7?

rwj,
I did not use the detail section but the report header. I tried sizing up but the problem really is after the last line is printed, the printer advances to a new page which is exactly on top of the 3rd form, skipping the 2nd.

Any idea on how I can tell the printer to stop printing after the last line has been printer and not to advance to a new page?

Thanks.
 
Hi,
If you know the exact record no. to page break then you can use the formula :-
if RecordNumber mod 5 = 0 then
true
else
false
Select details section, right click and click on format section.There check the 'New Page After' and correponding to it click on the box 'x+2' and insert the above formula.
I am displaying 5 records at a time so you can decide on which record no. to break everytime.I have used mod function bcoz i am breaking on every 5th record.
i.e. on 5,10,15,20 ect.....
And if you wnat to just break once then give the exact no. in the formula.
Eg:-
if RecordNumber = 5 then
true
else
false

Khushi.
 
You can use <Print Setup> to get the basic form, and then adjust the margins till it's just what you want. I am using Crystal 8.5, but it's common to most things under Windows Madawc Williams
East Anglia
Great Britain
 
KhushiRaina,

Hi,

I tried to work on your suggestion but still the it didnt work. I'm ony printing one record at a time what I want to do is keep track of the number of lines. Is there a formula or function that tells the printer not to page break after the last line has been printed? Or you have a better idea.

Thanks.
 
There is no Line No. formula.I thought you had to display series of records.Ok if its one record then choose the right paper format.
Go to File, select printer setup and choose paper size as index card (4*6in) which is approx half the size of letter format (8.5*11in).Then you can adjust your section accordingly to display the lines to be displayed.What all section are u displaying and in what section is the data displayed.
 
In Windows go to:
settings
printers
Select your printer
Select &quot;File&quot; on top Bar
Server Properties
Forms Tab
Tick Box &quot;Create New Form&quot;
Create your form size and name it
Go back to you printer properties
When you select paper size your form should be available
to you

Hope it helps
Mike


 
mike99,

Sorry for replying just now! Just want to inform you that your suggestion worked but I have to ask you one more thing. Do you have an idea on how I can programmatically choose a printer? You see, with your suggestion, I can only print on paper that conforms to the size I defined. I would like to use the printer to print on reports that utilize a letter size or legal size papers without having to change the printer settings.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top