I'm using string builder to create some text file reports. I can add a CrLf using
But when I add
it is not doing a form feed when I print with the following code where txtReport.Text contains the text from stbReport.ToString
Any way to make this work?
Auguy
Sylvania/Toledo Ohio
Code:
stbReport.Append("REPORT TOTAL".PadRight(15) _
+ New String(" "c, 59) _
+ RptPayTotal.ToString("#####,##0.00").PadLeft(12) _
+ ControlChars.CrLf)
Code:
stbReport.Append(ControlChars.FormFeed)
Code:
Dim myPrintObject As TextPrint = New TextPrint(txtReport.Text)
Dim dlg As New PrintDialog
dlg.Document = myPrintObject
Dim Result As DialogResult = dlg.ShowDialog
If (Result = System.Windows.Forms.DialogResult.OK) Then
If ReportLayout = "LANDSCAPE" Then
myPrintObject.DefaultPageSettings.Landscape = True
Else
myPrintObject.DefaultPageSettings.Landscape = False
End If
myPrintObject.Font = New Font("Courier New", ReportFont2)
myPrintObject.Print()
End If
Auguy
Sylvania/Toledo Ohio