Click here to Skip to main content
11,584,612 members (63,002 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# Tables itextsharp
recently i dealing with iTextSharp, and im new to this.
i learned how to create the table from this tutorial:[^]

and i also learn how to create the report by using pdf template.

now i created the pdf file as template,

the field name are "txtNo", "txtName", "txtAddress", "txtAmount" and "txtTotal".

what is the concept of looping the table row by using the template? and also i need to have a total of the amount at the bottom of the table. how to get the SUM(amount)?

Please advice me Smile | :)
Posted 6-Dec-12 19:40pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you can use following code to loop in table

TextControl tx = form1.TextControl1;
 int TblID =101;
string cText="Hello";
for (int i = 1; i <= tx.Tables.GetItem(TblID).Columns.Count; i++)
     tx.Tables.GetItem(TblID).Cells.GetItem(Row, Col).Text = cText
melvintcs at 9-Dec-12 19:51pm
may i know what is TextControl? i using VS2008 and i cant find this control..

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

  Print Answers RSS
0 OriginalGriff 430
1 Sergey Alexandrovich Kryukov 367
2 Dave Kreskowiak 260
3 Richard Deeming 220
4 virusstorm 194
0 OriginalGriff 1,703
1 Sergey Alexandrovich Kryukov 1,267
2 Abhinav S 711
3 Dave Kreskowiak 687
4 Suvendu Shekhar Giri 568

Advertise | Privacy | Mobile
Web04 | 2.8.150707.1 | Last Updated 8 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100