A
Alejandra Parra
In my code, I print a dataSet
' get grid's PrintDocument object
Dim pd As System.Drawing.Printing.PrintDocument
pd = flexgrid.PrintParameters.PrintDocument()
' set up the page (landscape, 1.5" left margin)
With pd.DefaultPageSettings
..Landscape = False
..Margins.Left = 50
Dim a As New Printing.PaperSize("Carta", 850, 1100)
..PaperSize = a
End With
' set up header and footer fonts
flexgrid.PrintParameters.HeaderFont = New Font("Tahoma", 10, FontStyle.Bold)
flexgrid.PrintParameters.FooterFont = New Font("Tahoma", 10,
FontStyle.Regular)
' preview the grid
flexgrid.PrintGrid("Calificaciones",
C1.Win.C1FlexGrid.PrintGridFlags.FitToPageWidth +
C1.Win.C1FlexGrid.PrintGridFlags.ShowPreviewDialog, _
Now.ToString("dd/MM/yyyy") + vbCrLf + Now.ToString("HH:mm:ss") _
+ Chr(9) + ObtieneInformacion("escuela") + vbCrLf + "Calificaciones Periodo
" & ObtieneInformacion("periodo") _
+ vbCrLf + "Grado: " & sGrado & " Grupo: " & sGrupo & " Materia: " &
sMateria.Replace(" ", "").Replace("|", " ") _
+ Chr(9) + ObtieneInformacion("seccion") + vbCrLf + "Página {0} de {1}", _
Chr(9) + Chr(9) + _
"Profesor: " & ObtieneInformacion("profesor") + vbCrLf + vbCrLf + vbCrLf +
"Firma: _________________________________")
It works fine, but when printing in a certain printer it prints just strange
characters
I can use this printer from any application in Windows and it works fine
I've already tried to install the printer drivers, but it is still printing
wrong
What can I do?
Alejandra Parra
Mexico
' get grid's PrintDocument object
Dim pd As System.Drawing.Printing.PrintDocument
pd = flexgrid.PrintParameters.PrintDocument()
' set up the page (landscape, 1.5" left margin)
With pd.DefaultPageSettings
..Landscape = False
..Margins.Left = 50
Dim a As New Printing.PaperSize("Carta", 850, 1100)
..PaperSize = a
End With
' set up header and footer fonts
flexgrid.PrintParameters.HeaderFont = New Font("Tahoma", 10, FontStyle.Bold)
flexgrid.PrintParameters.FooterFont = New Font("Tahoma", 10,
FontStyle.Regular)
' preview the grid
flexgrid.PrintGrid("Calificaciones",
C1.Win.C1FlexGrid.PrintGridFlags.FitToPageWidth +
C1.Win.C1FlexGrid.PrintGridFlags.ShowPreviewDialog, _
Now.ToString("dd/MM/yyyy") + vbCrLf + Now.ToString("HH:mm:ss") _
+ Chr(9) + ObtieneInformacion("escuela") + vbCrLf + "Calificaciones Periodo
" & ObtieneInformacion("periodo") _
+ vbCrLf + "Grado: " & sGrado & " Grupo: " & sGrupo & " Materia: " &
sMateria.Replace(" ", "").Replace("|", " ") _
+ Chr(9) + ObtieneInformacion("seccion") + vbCrLf + "Página {0} de {1}", _
Chr(9) + Chr(9) + _
"Profesor: " & ObtieneInformacion("profesor") + vbCrLf + vbCrLf + vbCrLf +
"Firma: _________________________________")
It works fine, but when printing in a certain printer it prints just strange
characters
I can use this printer from any application in Windows and it works fine
I've already tried to install the printer drivers, but it is still printing
wrong
What can I do?
Alejandra Parra
Mexico