Hi,
I need help to print the report page with pagebreak dynamically after every HtmlTable results set.In the following code, I want to put pagebreak inside the loop after PrintResourceSBT() function.
if(rptData.Tables["WorkGroup"].Rows.Count !=0 )
{ foreach(DataRow drWG in rptData.Tables["WorkGroup"].Rows)
{ PrintEmptyRow();
PrintWorkgroup(drWG["WorkGroup"].ToString());
PrintResourceSBT (workGroupName ,dr["Resource"],dr["ResourceId"],dr["EmployeeId"]);
}
}
Function PrintResourceSBT() like
private void PrintResourceSBT(string workGroupName, string resource , string resourceId , string EmployeeId)
{ HtmlTableRow htr = new HtmlTableRow();
htr.Cells.Add(ReportUtility.CreateSimpleHtmlCell("StatusHead", "Amount" ,1, "right" , ""));
htr.Cells.Add(ReportUtility.CreateSimpleHtmlCell("StatusHead", "Hours" ,1, "right" , ""));
tblReport.Rows.Add(htr);
-----
---- }
tblReport is
Replies
Know the answer? Post it — somebody with the same question will find it here.