General information
Title:
How to set the custom paper size for crystal report programa
I am using the following code.
Dim PrintDoc As New PrintDocument
Dim PkSize As New System.Drawing.Printing.PaperSize
Dim i
For i = 0 To PrintDoc.PrinterSettings.PaperSizes.Count - 1
If PrintDoc.PrinterSettings.PaperSizes.Item(i).PaperName = "15x6" Then
PkSize = PrintDoc.PrinterSettings.PaperSizes.Item(i)
End If
Next
GrnReport.PrintOptions.PaperSize = CType(PkSize.RawKind, CrystalDecisions.Shared.PaperSize)
GrnReport.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait
GrnReport.PrintToPrinter(1, False, 0, 0)
I am not getting any error. But i could not get the paper size that i have set during designing.
Where i am wrong?
Is there any other method to set the custom paper size.
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only