I have a datagrid on my aspx page. If I print out the page, if the datagrid continues onto a new page, the grid lines will not print. Is there any work around?
River: There is one approach that looks pretty good located at .NET247, q.v.,
The following assumes a button named PrintGrid, a DataGrid control named DataGrid1, and a PrintDocument component named PrintDocument 1:
Private Sub PrintGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintGrid.Click
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim myPaintArgs As New PaintEventArgs(e.Graphics, New Rectangle(New Point(0, 0), Me.Size))
Me.InvokePaint(DataGrid1, myPaintArgs)
End Sub
River: Over the last few days have been keeping an eye out on this printing business, not involved myself at this time with the issues. Seems there is very strong argument to use Crystal Reports; lot of support for that; might look into that, e.g., at the MS .NET Forum et al.
I agree. I have been working with Crystal Reports on the web for other things, although I am having problems with the printing there too. I can print with the IE print, but not the Crystal print button which exports it to pdf.
I noticed there were quite a bit of discussions going on with the Crystal Reports over at Microsoft's dot NET forum; might preview some of the threads there.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.