Need help with Report

Prajeesh_NairPrajeesh_Nair Member Posts: 70
hiii all
I need some help with my report which i created i want to display the no of pages in this formate Page No:1(100) i have written the code for this same formate to print in the footer and i used this code to in sert page no in the header also and i was successful from the second page only can any one give some advice
i am entering my code below
codeunit :

IF PageNo = 1 THEN
BEGIN
BodyCnt1:=Bodycnt;
Pagecnt := RecCount DIV (BodyCnt1-1);
Pagecnt+=1;
Pagecnt1:= Pagecnt;
BodyCnt1:=0;
END
ELSE
Pagecnt := Pagecnt1;

IF Pagecnt < RecCount DIV(Bodycnt-1) THEN
Pagecnt:=PageNo;

header part


IF cnt=0 THEN
BEGIN
pagecnt:=Cod50100.PageCunter(COUNT,cnt,CurrReport.PAGENO);
Txt001:='Page No. ' + FORMAT(CurrReport.PAGENO) + ' of ' + FORMAT(pagecnt-1);
END;

body


IF CurrReport.PAGENO=1 THEN
cnt+=1;

footer


pagecnt:=Cod50100.PageCunter(COUNT,cnt,CurrReport.PAGENO);
Txt001:='Page No. ' + FORMAT(CurrReport.PAGENO) + ' of ' + FORMAT(pagecnt-1);



thanx in advance

Comments

  • kinekine Member Posts: 12,562
    Just search the forum for how to print the total number of page in report. There are tips how to do that. But it is not so easy, if you really do not need that, it is more expansive than effect you get...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Prajeesh_NairPrajeesh_Nair Member Posts: 70
    i have gone through all problems explained in the forum i have different problem and i even tried html put was not successful
    my problem is that i am able to get the page no in the formate No of pages:2(55-total pages) in the footer with the above coding . i want to get this in my header i was successful to get the it from only second page header only using the same coding but in the first page i got wrong total page no the problem is that the body i have written code to find how much data can my body hold according to that the total page is calculated if the body is streched then the toatal page will be increased. how can i get the total page in my header please help me
Sign In or Register to comment.