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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page length increase

Status
Not open for further replies.

shanmugham

Programmer
Jun 19, 2001
71
IN
i am using printer.print command for my report (direct)printing

now Printing 12 lines only per page, i want to increase the page length up to 30 lines


please give me a exact command for page lenth increasing

shan
 
what kind of a report do u use? crystal or ur own report format?

Known is handfull, Unknown is worldfull
 
my own report format
that is using
printer.print
command method

thanks in advance, anyone help me this is very urgent
shan


 
are u printing from the form or any control like Rich text control?

Known is handfull, Unknown is worldfull
 
i am using the following code


Private Sub cmdmds_Click()
Dim i As Integer
Dim bcancel As Boolean
Dim ncopy As Integer
On Error GoTo error1
bcancel = False
CommonDialog1.Flags = cdlPDHidePrintToFile Or _
cdlPDNoSelection Or _
cdlPDNoPageNums Or _
cdlPDCollate
CommonDialog1.CancelError = True
CommonDialog1.PrinterDefault = True
CommonDialog1.Copies = 1
CommonDialog1.ShowPrinter
If bcancel = False Then
Printer.Print ;
With Printer
.FontName = "Roman"
.FontSize = 14
.FontBold = False
.FontItalic = False
.FontUnderline = False
End With
Dim i1, j, n, k As Integer
rs1.MoveFirst
For n = 1 To rs1.RecordCount
'For n = 1 To 1
Printer.FontSize = 14
For i = 1 To 43
Printer.Print " "
Printer.FontSize = 2
Printer.Print " "
Printer.Print " "
Next i
Printer.FontSize = 88
Printer.Print " "
Printer.FontSize = 12
k = Len(RTrim(LTrim(rs1("Name"))))
k = Int(44 - k / 2)
Printer.Print ; Tab(k); rs1("name")
Printer.FontSize = 18
Printer.Print " "
Printer.FontSize = 12
Printer.Print " "
Printer.Print " "
Printer.Print ; Tab(45); rs1("branch")
Printer.Print " "
'Printer.Print " "
Printer.FontSize = 10
Printer.Print " "
Printer.FontSize = 12
If rs1("sex") = "M" Then
Printer.Print ; Tab(9); "XXX"
Else
Printer.Print ; Tab(4); "XX"
End If
Printer.FontSize = 7
Printer.Print " "
Printer.FontSize = 18
Printer.Print " "
Printer.Print " "
'Printer.Print " "
Printer.FontSize = 12
Printer.Print ; Tab(20); rs1("mmyystr")
rs1.MoveNext
Dim mvar
mvar = MsgBox("One Record Printed, Continue", vbYesNoCancel, vbExclamation)
If mvar = vbCancel Or mvar = vbNo Then
Exit For
End If

Printer.NewPage
Next n
End If
Exit Sub
error1:
If Err.Number = cdlCancel Then
bcancel = True
Resume Next
End If
End Sub


pl give me the page length increase

thanks in advance
shan
 
Look in VBHelp for Printer.Papersize property - there is a list of pre-defined constants to use


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
u can change the printing only by reducing the font (or) tab space.
u cannot increase the number of lines to be printed usign code.

Known is handfull, Unknown is worldfull
 
i am using pre-printed stationary,(certificate)

font size reducing is not possible

printer.papersize = 1 ,is not working

pl. help

shan

 

In your 'For n = 1 To rs1.RecordCount' loop, you have:-

For i = 1 To 43
Printer.Print " "
Printer.FontSize = 2
Printer.Print " "
Printer.Print " "
Next i

This loop uses approximately 40% of your page length before you actually start printing any characters.

Is this intended or is this why you see only 12 lines printed on each page.

I haven't checked the rest of your code because it's too difficult to follow. Try breaking it down to test it or try re-writing it so that you can see how it works.

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top