Hello,
I'm trying to have a page count based on the gruping I've set on a int, if I exceed a page (considering header and footer) I wish to reset the number of the page to 1... for example page 1/2...page 2/2 for user "aaa", then page 1/1 for user "bbb" and so on... how can I achive this?
I'm trying to have a page count based on the gruping I've set on a int, if I exceed a page (considering header and footer) I wish to reset the number of the page to 1... for example page 1/2...page 2/2 for user "aaa", then page 1/1 for user "bbb" and so on... how can I achive this?
7 Answers, 1 is accepted
0
Hi Paolo,
No such functionality is available in a single report as the PageCount and PageNumber are global objects and the data processing and paging are two separate processes. Furthermore, each rendering extension has a different paging mechanism which complicates the task even more.
Resetting the paging is only available when using ReportBook as there you combine several reports.
All the best,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
No such functionality is available in a single report as the PageCount and PageNumber are global objects and the data processing and paging are two separate processes. Furthermore, each rendering extension has a different paging mechanism which complicates the task even more.
Resetting the paging is only available when using ReportBook as there you combine several reports.
All the best,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Michele
Top achievements
Rank 2
answered on 08 Sep 2009, 12:25 PM
ah ok.... sad to hear this....and what about a reportbook with a report? can I create a single report then attach them to one book and print as only one pdf?
0
Hi Paolo,
You can but it would not do you any good for the scenario you're after as the page reset is applicable only when a new report begins in a reportbook.
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You can but it would not do you any good for the scenario you're after as the page reset is applicable only when a new report begins in a reportbook.
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Michele
Top achievements
Rank 2
answered on 08 Sep 2009, 12:34 PM
So you say that if I do this :
foreach (Oggetto o in tmp)
{
Test t = new Test();
t.DataSource = o;
reportBook1.Reports.Add(t);
}
I'll have pages that won't restart?
PS : I've tried....this way I've got the page count restart... but I've got the total page count that won't reset.... how can I read the pagecount value by code in the report file? I can save to a static variable then read it...
0

Michele
Top achievements
Rank 2
answered on 25 Sep 2009, 09:44 AM
Hello,
it's been a while from my last post about Telerik Reporting... I was wondering if it's possible to have the total page reset in the booking ... Now I've the reset for the single reports but not on the total, so I've
1of120,2of120,3of120,1of120
|---------------------------| |-------|
First Second
Thanks
Paolo
it's been a while from my last post about Telerik Reporting... I was wondering if it's possible to have the total page reset in the booking ... Now I've the reset for the single reports but not on the total, so I've
1of120,2of120,3of120,1of120
|---------------------------| |-------|
First Second
Thanks
Paolo
0
Hello Paolo,
As explained in previous posts, resetting the PageCount is currently not possible and we would consider this for future implementation. We're not aware of your scenario, but believe there are two cases:
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
As explained in previous posts, resetting the PageCount is currently not possible and we would consider this for future implementation. We're not aware of your scenario, but believe there are two cases:
- you generate the report book for reading/looking at it - in this case you do not need the PageCount as the reader would see where a new chapter/report begins
- you need this for printing - in this case, do not generate a report book, but print the reports directly using the reportProcessor.PrintReport() method.
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Michele
Top achievements
Rank 2
answered on 25 Sep 2009, 01:51 PM
Hello Steve,
I've looked at the links you gave me, thanks a lot, I also took a look at the telerik reporting source code, and I think there's something I'm missing...
I've seen that using this :
I can have in h some elements I MUST need that are StartPage and EndPage...
I looked at the code to understand why I always retrieve a 0 for them and I've seen this :
ReportProcessor.cs
Deeping you go to :
This mean that I need to have a node named "PageCount" in my ExpressionNode node to have count enabled... I have but they are still 0 ... I put them either in PageHeader then in PageFooter but with no luck..
Thanks
I've looked at the links you gave me, thanks a lot, I also took a look at the telerik reporting source code, and I think there's something I'm missing...
I've seen that using this :
Test t = new Test(); |
t.DataSource = o; |
Hashtable h = new Hashtable(); |
ReportProcessor rp = new ReportProcessor(); |
RenderingResult result = rp.RenderReport("PDF", t, h); |
string fileName = "c:\\temp\\tt\\" + o.Key + ".pdf"; |
I can have in h some elements I MUST need that are StartPage and EndPage...
I looked at the code to understand why I always retrieve a 0 for them and I've seen this :
ReportProcessor.cs
static bool NeedTotalPageCount(IList<Processing.Report> reports) |
{ |
for (int i = 0; i < reports.Count; i++) |
{ |
Report report = reports[i]; |
if (report.NeedsTotalPageCount) |
{ |
return true; |
} |
} |
return false; |
} |
Deeping you go to :
internal static bool ContainsPageCount(ExpressionNode node) |
{ |
if (null != node) |
{ |
return node.Visit(visitedNode => |
{ |
NameNode nameNode = visitedNode as NameNode; |
if (null != nameNode) |
{ |
return (null == nameNode.Node && nameNode.Name == "PageCount"); |
} |
return false; |
}); |
} |
return false; |
} |
This mean that I need to have a node named "PageCount" in my ExpressionNode node to have count enabled... I have but they are still 0 ... I put them either in PageHeader then in PageFooter but with no luck..
Thanks