Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Crystal report page size

$
0
0

Dear Experts,

 

I'm using Crystal report 13.0.7 with wpf application  and I want to control page length by vb.net code and printer independent, i have write some logic but not fount result as i wish.

Please guide me what is missing......

 

-------------------------------------------------------------------------------------

Dim report As New ReportDocument

Dim billrpt As String = "\print\blkprt.rpt"

 

report = New CrystalDecisions.CrystalReports.Engine.ReportDocument ' ReportDocument

report.Load(billrpt)

 

report.SetParameterValue(0, Ser) 'Bill Serial

report.SetParameterValue(1, Invno) ' Bill No

report.SetParameterValue(2, Invnodt) ' Bill Date

 

Dim PkSize As New System.Drawing.Printing.PaperSize

 

Dim wd As Integer = 8.50

Dim hd As Integer = 6.00

 

report.PrintOptions.DissociatePageSizeAndPrinterPaperSize = False

 

PkSize = New Printing.PaperSize("manoj", wd, hd)

report.PrintOptions.PaperSize = CType(PkSize.RawKind, CrystalDecisions.Shared.PaperSize)

report.PrintOptions.PaperOrientation = IIf(report.PrintOptions.PaperOrientation = PaperOrientation.Portrait, CrystalDecisions.Shared.PaperOrientation.Portrait, CrystalDecisions.Shared.PaperOrientation.Landscape)

 

report.PrintToPrinter(1, False, 0, 0)

 

report.Close()

report.Dispose()


Thanks & Regards Manoj Patel


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>