Click here to Skip to main content
15,914,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display a DataGridView record in a HTML report.

How can I generate HTML report page by using VB.net code dynamically?
Posted
Updated 1-Apr-10 1:02am
v2

1 solution

Yes you can. I used to generate HTML reports from Excel and VB Apps all the time.

HTML Reports are just text files, so construct the output in the normal way by writing text files using standard HTML markup. After all what is a DataGridView? nothing more than a fancy table.

So start by putting out the standard header;
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>

Then iterate each row and col of the datagridview making up the table as you go;
<TABLE>
<TR><TD></TD><TD></TD></TR>
<TR><TD></TD><TD></TD></TR>
</TABLE>

Then close the report
</BODY>
</HTML>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900