Dim phf As PageHeaderFooter = _
TryCast(_PrintableComponentLink.PageHeaderFooter, PageHeaderFooter)
phf.Header.Content.Clear()
Dim pfh As PageHeaderFooter = _ TryCast(_PrintableComponentLink.PageHeaderFooter, PageHeaderFooter)
phf.Header.Content.Clear()
Dim judulLaporan As String = "LAPORAN PEMBELIAN SUBLET"
Dim footerRight As String = "Tanggal Di Print: [Date Printed] Pages: [Page # of Pages #]"
Dim footerLeft As String = _UserNama
With phf
.Header.Content.AddRange(New String() {judulLaporan & _
vbCrLf & _
"PERIODE: " & _
bklPembelianSublet_Laporan.cboPeriode.EditValue, "", _PerusahaanNama})
.Header.LineAlignment = BrickAlignment.Far
.Header.Font = New Font("Tahoma", 14, FontStyle.Bold)
.Header.LineAlignment = BrickAlignment.Center
.Footer.Content.AddRange(New String() {footerLeft, "", footerRight})
.Footer.LineAlignment = BrickAlignment.Far
.Footer.Font = New Font("Tahoma", 10, FontStyle.Regular)
.Footer.LineAlignment = BrickAlignment.Center
End With
_PrintableComponentLink.Component = _gridControl
PrintingSystem1.Links.Add(_PrintableComponentLink)
With _PrintableComponentLink
.Landscape = True
With .Margins
.Left = 1
.Right = 1
.Bottom = 1
End With
.CreateDocument()
End With
0 komentar:
Posting Komentar