Can I have total number of pages printed on report?
gumwitka
Member Posts: 34
Hello,
Is it possible to have on report the total number of pages printed, so on page 1 you get 1/3, on 2 get 2/3 and the last one 3/3; so it’s easy to check if you have all pages. :-k
Is it possible to have on report the total number of pages printed, so on page 1 you get 1/3, on 2 get 2/3 and the last one 3/3; so it’s easy to check if you have all pages. :-k
0
Comments
-
0
-
-
Thank you.
Can you tell me where I should place this code :?:
CLEAR(TestReport);
TestReport.SAVEASHTML('u:\test.html');
PageCount := TestReport.ReturnTotalPages;
CLEAR(TestReport);
TestReport.DefTotalPages(PageCount);
TestReport.RUN;
I placed it Report - OnPreReport() (in report for which I want to have pages calculated) but when I run report gets into loop.0 -
Yes, you should add some variable to the report that indicates that it's runnung purpose is for pagecounts.
You can activate this variable with a function e.g.
SetPageCount
PageCount := TRUE;
And in your code:
IF PageCount THEN BEGIN
blablabla
END:
Goodluck.0 -
I have:
Report - OnPreReport()
IF PageCounts THEN BEGIN
CLEAR(TestReport);
TestReport.SAVEASHTML('u:\test.html');
PageCount := TestReport.ReturnTotalPages;
CLEAR(TestReport);
TestReport.DefTotalPages(PageCount);
TestReport.RUN;
END;
I have also declared 3 functions:
ReturnTotalPages() : Integer
{
EXIT(CurrReport.PAGENO);
}
DefTotalPages(PageNo : Integer)
{
PNO:=PageNo;
}
SetPageCount()
{
PageCounts := TRUE;
}
However it is still not clear for me where I should call last function SetPageCount() from and where set PageCounts to FALSE. I keep receiving loop
0 -
PageCounts would be filled with false in OnInitReport. Function SetPageCount() would be called from code which invokes report.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
