I don't have any report generator and i want to build it myself.
My reports are very simple with few constants fields that i need to fill them after running some task and i wonder maybe to create a HTML document with const and desin tamplate and i will replace the relevant data in this document(text) and i will save it as temporary HTML file and show it with WebBrowser control as a HTML file . This action save me to deal with Printing,Vertical/Horizontal Scrolls....
My Q's are :
1. Is it ok like that
2. Is there a simply way for build this simple report
3. Any example for similar use / thought
Any help will be useful .........

How to Create Simple Report as HTML ?
ReNeLaDy
Creation of an HTML document is really easy to do. Essentially the only thing that special about an html document is that it has a header and a trailer.
I'll show it to you. It doesn't look right to me but it works and because it works I've never changed it.
Here's the header as a simple VB Constant:
Public
Const HTMLSalutation As String = "<html><head>"This would be at the very beginning of your document
Here is the trailer constant:
Public
Const HTMLCLose As String = "</body></html>"This should go at the very end of your document. To display the document you may want to replace all space characters with "nbsp"
That should work.
Corey B
It won't be look like that because you've hardcoded the the dollar amounts.
I have a sample of VB6 code... which should be the same in vs2005...
but it will look something like this....
a = "<html ><head>" & vbCrLf & "<div align=""" & "left""" & ">" & vbCrLf
'
a = a & "<table border=" & """1" & """ width=""" & "100%""" & " height=" & """81" & " id=""" & _
"AutoNumber1""" & " bordercolorlight=""" & "#0000FF""" & " bordercolordark=""" & "#6600FF""" & ">" & vbCrLf
a = a & "<tr>" & vbCrLf
a = a & "<td width=""" & "33%""" & " height=""" & "34""" & " bgcolor=""" & BColor & """><font color=""" & _
FontColor & """>Author: <br>" & Username & "</font></td>" & vbCrLf
a = a & "<td width=""" & "33%""" & " height=""" & "34""" & " bgcolor=""" & BColor & """><font color=""" & _
FontColor & """>Message Type: " & MsgTyp & "<br>" & TimeNow & " " & DateNow & "</font></td>" & vbCrLf
a = a & "<td width=""" & "33%""" & " height=""" & "34""" & " bgcolor=""" & BColor & """><font color=""" & _
FontColor & """>Reference No.: " & MsgNo & "<br> </font></td>" & vbCrLf & "</tr>" & "<tr>" & vbCrLf
a = a & "<td width=""" & "100%""" & " height=""" & "34""" & " colspan=""" & "3""" & " bgcolor=""" _
& "#FFFFFF""" & "><font color=""" & "#000000""" & ">" & MsgBod & "<br> </td>" & vbCrLf
a = a & "</tr></table>" & "</div></BODY></HTML>" & vbCrLf
MsgBod = ""
FormatMsg = a
a = ""
Ashwin11557
here's some sample code:
<html>
<head>
<title></title>
</head>
<body>
<table border="0" cellspacing="5" cellpadding = "2">
<tr>
<td align="left">My Total Cash</td>
<td align = "left">$11,356.56</td>
</tr>
<tr>
<td align="left">My second text data</td>
<td align = "right">$56.56</td>
</tr>
<tr>
<td align="left">My third text data</td>
<td align = "right">% 56.56</td>
</tr>
</table>
</body>
</html>
Here's a suggestion for emitting it from VB.NET
Dim qt As String = Chr(34)
dim myData as string = "$11,356.56"
Dim fs As New System.IO.FileStream("c:\myTestFile.txt", IO.FileMode.Create)
Dim sw As New System.IO.StreamWriter(fs)
'many lines will be simple like this one
sw.WriteLine("<html>")
'some will require special consideration for outputting quote marks
sw.WriteLine("<td align=" & qt & "left" & qt & ">" & myData & "</td>")
Cheers,
--William
hackinfool
<td align="left">$11,356.56</td>
should be...
<td align="right">$11,356.56</td>
also, in HTML, you should not generally use the   command except in certain cases, but your needs do not require the use of  . the align="left", align="right" or align="center" attributes of the <td> tag will serve you much better.
also, in case it helps you to understand how the table works better, consider the following:
<tr> defines a row
<td> defines a cell within the containing row
<table>
<tr>
<td>some content</td>
<td>some more content</td>
</tr>
</table>
the above code defines a table with one row; the one row contains two cells (or, you might say, two columns).
HTML largely works with "containers." The table contains one row. The row contains two cells. Each cell contains some text content.
Cheers,
--William
Angel Lee
Thanks for your answer.
I have problem with the align the text and values. for example:
"
My Total Cash $ 11,356.56
My Second Text Data2 $ 56.56
My Second Text Data3 % 56.56
......"
i tryed to calculate the space that left betwwen text to data and add   (i define constant characters for each line), but it dosn't align to the right side,it is close to but not straight line. How can i fixed it