Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Private Sub pdReport_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pdReport.PrintPage 'Get the data Dim cn As New OleDbConnection(ConfigurationManager.ConnectionStrings("TheConnection").ConnectionString) cn.Open() Dim cm As New OleDbCommand("Select Name,City,State from Suppliers", cn) cm.CommandType = CommandType.StoredProcedure Dim rdr As OleDbDataReader = cm.ExecuteReader 'Set the starting vertical location for printing Dim y As Integer = 55 'Loop through the records Do While rdr.Read 'Print each column at the specific location e.Graphics.DrawString(rdr.Item("Name").ToString, printFont, Brushes.Black, 100, y + 15) e.Graphics.DrawString(rdr.Item("City").ToString, printFont, Brushes.Black, 250, y + 15) e.Graphics.DrawString(rdr.Item("State").ToString, printFont, Brushes.Black, 425, y + 15) 'Increment y so the next line will print after the current line y += 15 'Evaluate y to see if a new page is needed If y >= 1000 Then e.HasMorePages = True 'Reset where y starts y = 55 End If Loop 'No more records end the document e.HasMorePages = False End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.