>Select Count(*) From Billcompress Where Alltrim(PS)="U1" Into Array NewHeaderpagecount > Goto 4 > cBillcompressedpage="%%Pages: "+Alltrim(Str(NewHeaderpagecount)) > Replace PS With cBillcompressedpage > lcStr = Strtran(lcStr, "&Oldheaderpagecount", "&cBillcompressedpage") > > Locate For Alltrim(PS)="U1" > Skip-5 > Insert Blank > Pagenumber='F8 (Page No. 1 of '+Alltrim(Str(NewHeaderpagecount))+')500 10 w' > Replace PS With Pagenumber > > For I=2 To NewHeaderpagecount > NeXTTEXT='%%Page: '+Alltrim(Str(I+1))+" "+Alltrim(Str(I+1)) > Locate For PS=NeXTTEXT > Replace PS With 'F8 (Page No. '+Alltrim(Str(I))+' of '+Alltrim(Str(NewHeaderpagecount))+')500 10 w' > ENDFOR >>
>F12 (Penalty For Late Payments Made)32 571 w >(62.72)382 570 x >F11 (Total Charges \(Rs.\))32 561 w >‘F8 (Page 1 of 5) 500 10 w’ && Footer Inserted >(62.72)381 561 x > 14 477 T M 90 O g n > M -90 O -14 -477 T >G >U1 && End of Page 1 >F12 (Penalty For Late Payments Made)32 571 w >(62.72)382 570 x >F11 (Total Charges \(Rs.\))32 561 w >‘F8 (Page 2 of 5) 500 10 w’ && Footer Inserted >(62.72)381 561 x > 14 477 T M 90 O g n > M -90 O -14 -477 T >G >U1 && End of Page 2 >>
>F12 (Penalty For Late Payments Made)32 571 w >(62.72)382 570 x >F11 (Total Charges \(Rs.\))32 561 w >‘F8 (Page 1 of 5) 500 10 w’ && Footer Inserted >(62.72)381 561 x > 14 477 T M 90 O g n > M -90 O -14 -477 T >G >U1 && End of Page 1 >F12 (Penalty For Late Payments Made)32 571 w >(62.72)382 570 x >F11 (Total Charges \(Rs.\))32 561 w >‘F8 (Page 2 of 5) 500 10 w’ && Footer Inserted >(62.72)381 561 x > 14 477 T M 90 O g n > M -90 O -14 -477 T >G >U1 && End of Page 2 >F12 (Penalty For Late Payments Made)32 571 w >(62.72)382 570 x >F11 (Total Charges \(Rs.\))32 561 w > (62.72)381 561 x > 14 477 T M 90 O g n > M -90 O -14 -477 T >G >‘F8 (Page 3 of 5) 500 10 w’ && Footer Inserted >0 -72 &Prefixmul mul translate && >F12 (Penalty For Late Payments Made)32 571 w >(62.72)382 570 x >F11 (Total Charges \(Rs.\))32 561 w >0 -72 &Prefixmul mul translate && No Footer Insertion required. >F12 (Penalty For Late Payments Made)32 571 w >(62.72)382 570 x >F11 (Total Charges \(Rs.\))32 561 w > (62.72)381 561 x >U1 >I'd keep it simple and read in line by line and write out to a new version. If you hit a U1 insert the footer. If you hit a Prefixmul ditto but ignore the next U1.