Click here to Skip to main content
15,905,229 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Dear All


I have an asp .net page containing paragraphs and a dynamically created table.
The table will be populated with values taken from the database.The Page works fine.But when ever I try to convert into pdf The table is not displayed on the pdf file but all paragraphs are displayed fine..Could any one please tell me how to export this dynamically created table on the page to pdf..


Thank You....
Posted
Comments
sudevsu 6-Jan-15 8:54am    
If I were you, I would try exporting it to Excel/word and then convert to PDF. Because PDF looks table as diagram/image/picture.
SubhashRokzzz 6-Jan-15 9:14am    
Could you please tell me how to export a particular portion inside a fieldset into word format? The fieldset contains paragraphs and a dynamically created table.

Thank You...
sudevsu 6-Jan-15 9:31am    
Please look at the link provided in solution

Convert Datatable Records in Html Format Then You easily Convert Datatable Records In pdf.
 
Share this answer
 
Comments
SubhashRokzzz 6-Jan-15 9:18am    
How to convert into HTML format?
I have used <asp:Table ID="tbl1" runat="server">
<asp:TableRow>
<asp:TableCell>PRODUCT CODE
<asp:TableCell>PRODUCT NAME
<asp:TableCell>RATE



after converting to pdf I am getting only these header row of the table and the asp .net page shows 320 rows in this table. These dynamically fetched data is not shown in pdf..could you please help me..


Thank You
SubhashRokzzz 6-Jan-15 9:22am    
I have put respective closing tags for <asp:tablecell>,<tablerow> and <table>..here in codeproject's comment box it does not shows the closing tags...
There is very good article that has sample code and a demo you can try for

http://www.aspsnippets.com/Articles/Export-DataSet-or-DataTable-to-Word-Excel-PDF-and-CSV-Formats.aspx[^]

If that has helped you please mark the solution
 
Share this answer
 

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