hello guys
can u help me with this my code

Dim myFile As String = "C:\report.html"
        Dim stream As New IO.FileStream(myFile, IO.FileMode.Create)
        Dim writer As New IO.StreamWriter(stream)
        writer.WriteLine()
        writer.WriteLine("" & TextBox8.Text)
        writer.WriteLine("" & DateTimePicker1.Text)
        writer.WriteLine()
        writer.WriteLine()
        writer.WriteLine("Customer Name      |      Cost     |  Number of hours   |   Time Start   |  Time Remaining  |    Facility Name     |     Amenity Name      |    Incharge Employee")
        writer.WriteLine()
        writer.WriteLine()
 writer.WriteLine()
        For Each item As ListViewItem In ListView1.Items
            writer.WriteLine(item.SubItems(0).Text & "             |   " & item.SubItems(1).Text & "                 |   " & item.SubItems(2).Text & "   |   " & item.SubItems(3).Text & "   |   " & item.SubItems(4).Text & "  |   " & item.SubItems(5).Text & "  |   " & item.SubItems(6).Text & "   |   " & item.SubItems(7).Text)
        Next
        writer.Flush()
        writer.Close()
        stream.Close()

the output should be like this
example:
12:00
september 30, 2010

customer name | no. hours | cost | time start | time remaining | ........ and so on..
----------------

but my output like this
12:00 september 30, 2010 customer name | cost...............

question: how would i make the date and time should display in the center? and have the table in html design for those data that save in report.html...

Dim myFile As String = "C:\report.html"
		Dim stream As New IO.FileStream(myFile, IO.FileMode.Create)
		Dim writer As New IO.StreamWriter(stream)
		writer.WriteLine(TextBox8.Text)
		writer.WriteLine(DateTimePicker1.Text)
		writer.WriteLine(<p/>)
		writer.WriteLine("<table width='95%' border='1' cellspacing='1' cellpadding='1'> ")
		writer.WriteLine(<tr>
							 <td><strong>Customer Name</strong></td>
							 <td><strong>Cost</strong></td>
							 <td><strong>Number of hours</strong></td>
							 <td><strong>Time Start</strong></td>
							 <td><strong>Time Remaining</strong></td>
							 <td><strong>Facility Name</strong></td>
							 <td><strong>Amenity Name</strong></td>
							 <td><strong>Incharge Employee</strong></td>
						 </tr>)
	
		For Each item As ListViewItem In ListView1.Items
			writer.WriteLine(String.Format(<tr>
											   <td>{0}</td>
											   <td>{1}</td>
											   <td>{2}</td>
											   <td>{3}</td>
											   <td>{4}</td>
											   <td>{5}</td>
											   <td>{6}</td>
											   <td>{7}</td>
										   </tr>, item.SubItems(0).Text, & item.SubItems(1).Text,item.SubItems(2).Text,item.SubItems(3).Text,item.SubItems(4).Text,item.SubItems(5).Text,item.SubItems(6).Text,item.SubItems(7).Text))
		Next
		writer.WriteLine("</table>")
		writer.Flush()
		writer.Close()
		stream.Close()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.