Discussions
Activity
Best Of...
Sign In
·
Register
Home
›
NAV/Navision Classic Client
Howdy, Stranger!
It looks like you're new here. Sign in or register to get started.
Sign In
Register
Quick Links
Categories
Recent Discussions
Activity
Best Of...
Unanswered
Categories
All Categories
73
General
73
Announcements
66.6K
Microsoft Dynamics NAV
18.7K
NAV Three Tier
38.4K
NAV/Navision Classic Client
3.6K
Navision Attain
2.4K
Navision Financials
115
Navision DOS
854
Navision e-Commerce
1K
NAV Tips & Tricks
772
NAV Dutch speaking only
615
NAV Courses, Exams & Certification
2K
Microsoft Dynamics-Other
1.5K
Dynamics AX
310
Dynamics CRM
109
Dynamics GP
10
Dynamics SL
1.5K
Other
993
SQL General
384
SQL Performance
34
SQL Tips & Tricks
34
Design Patterns (General & Best Practices)
Architectural Patterns
10
Design Patterns
5
Implementation Patterns
53
3rd Party Products, Services & Events
1.7K
General
1.1K
General Chat
1.6K
Website
79
Testing
1.2K
Download section
23
How Tos section
260
Feedback
12
NAV TechDays 2013 Sessions
13
NAV TechDays 2012 Sessions
Can I have total number of pages printed on report?
gumwitka
Member
Posts:
34
2007-03-06
edited 2007-03-06
in
NAV/Navision Classic Client
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
0
Comments
Falc
Member
Posts:
6
2007-03-06
Yes, it is. Look here:
http://www.mibuso.com/forum/viewtopic.p ... mber+pages
0
gulamdastagir
Member
Posts:
411
2007-03-06
or here
http://www.mibuso.com/forum/viewtopic.p ... 23371805c9
Regards,
GD
0
gumwitka
Member
Posts:
34
2007-03-06
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
Marije_Brummel
Member, Moderators Design Patterns
Posts:
4,262
2007-03-06
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.
Marije Brummel
| Freelance Business Central Specialist
0
gumwitka
Member
Posts:
34
2007-03-06
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
lubost
Member
Posts:
628
2007-03-06
PageCounts would be filled with false in OnInitReport. Function SetPageCount() would be called from code which invokes report.
0
Sign In
or
Register
to comment.
Comments
http://www.mibuso.com/forum/viewtopic.p ... mber+pages
http://www.mibuso.com/forum/viewtopic.p ... 23371805c9
GD
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.
You can activate this variable with a function e.g.
SetPageCount
PageCount := TRUE;
And in your code:
IF PageCount THEN BEGIN
blablabla
END:
Goodluck.
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