I am using Telerik Reporting 2009 Q2 version. In my report, I need to reset the page number by report group.
I had been looking for the solution few days.
In the forum, referring to (http://www.telerik.com/community/forums/reporting/telerik-reporting/having-a-pagecount-on-grouping.aspx)
Mr Steve said, Telerik don't have such feature.
But, is there any work around to have it?
I actually did write a function for it. But still not able to get the result as I want. Below is the function:
In my report, I define the page number as 1 in the text box by default.
When I preview the report, I keep getting page number = 1 even thought a DO is print in 2 pages.
Where is my mistake? Or, the function above totally won't be working?
I had been looking for the solution few days.
In the forum, referring to (http://www.telerik.com/community/forums/reporting/telerik-reporting/having-a-pagecount-on-grouping.aspx)
Mr Steve said, Telerik don't have such feature.
But, is there any work around to have it?
I actually did write a function for it. But still not able to get the result as I want. Below is the function:
private void ghDO_ItemDataBound(object sender, EventArgs e) |
{ |
//Get the group section object from sender |
Telerik.Reporting.Processing.GroupSection groupSection = (Telerik.Reporting.Processing.GroupSection)sender; |
//From the group section object get the current DataRow |
System.Data.DataRow row = (System.Data.DataRow)groupSection.DataObject.RawData; |
//If Previous DO is not equal to current DO. Page Number reset to 1. |
if (OldDO != null && OldDO != groupSection.DataObject["do_no"].ToString()) |
{ |
|
pageNumber = 1; |
} |
else |
{ |
pageNumber = pageNumber + 1; |
} |
OldDO = groupSection.DataObject["do_no"].ToString(); |
pageNo.Value = pageNumber.ToString(); |
} |
When I preview the report, I keep getting page number = 1 even thought a DO is print in 2 pages.
Where is my mistake? Or, the function above totally won't be working?