PDA

View Full Version : Subfile display problem



David Abramowitz
04-12-2001, 05:21 AM
It would help if you posted some code. Dave

Guest.Visitor
04-12-2001, 06:25 AM
<DIV><FONT face=Arial size=2>It appears to me that your page up routine is something like this:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT></DIV> <DIV><FONT face=Courier size=2>C FirstRcd SetLL File</FONT></DIV> <DIV><FONT face=Courier size=2>C1DoSflPag RRN</FONT></DIV> <DIV><FONT face=Courier size=2>C ReadP File</FONT></DIV> <DIV><FONT face=Courier size=2>C If%eof</FONT></DIV> <DIV><FONT face=Courier size=2>C Leave</FONT></DIV> <DIV><FONT face=Courier size=2>C Else</FONT></DIV> <DIV><FONT face=Courier size=2>C Write Sfl</FONT></DIV> <DIV><FONT face=Courier size=2>C Endif</FONT></DIV> <DIV><FONT face=Courier size=2>C EndDo</FONT></DIV> <DIV><FONT face=Courier size=2></FONT></DIV> <DIV><FONT face=Arial size=2>In otherwords, you are reading backwards but filling the subfile forwards. You have two options; you can read backwards the number of records in a page of the subfile and then fill the subfile reading forwards, or you can fill the subfile backwards as you are reading backwards. Examples follow:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT></DIV> <DIV><FONT face=Courier size=2>C FirstRcd SetLL File</FONT></DIV> <DIV><FONT face=Courier size=2>C 0 DoSflPag</FONT></DIV> <DIV><FONT face=Courier size=2>C ReadP File</FONT></DIV> <DIV><FONT face=Courier size=2>C EndDo</FONT></DIV> <DIV><FONT face=Courier size=2>C If%eof(File)</FONT></DIV> <DIV><FONT face=Courier size=2>C*LoValSetll File</FONT></DIV> <DIV><FONT face=Courier size=2>C Endif</FONT></DIV> <DIV><FONT face=Courier size=2>C 1DoSflPag RRN</FONT></DIV> <DIV><FONT face=Courier size=2>C ReadFile</FONT></DIV> <DIV><FONT face=Courier size=2>C If%eof</FONT></DIV> <DIV><FONT face=Courier size=2>C Leave</FONT></DIV> <DIV><FONT face=Courier size=2>C Else</FONT></DIV> <DIV><FONT face=Courier size=2>C Write Sfl</FONT></DIV> <DIV><FONT face=Courier size=2>C Endif</FONT></DIV> <DIV><FONT face=Courier size=2>C Enddo</FONT></DIV> <DIV><FONT face=Courier size=2></FONT></DIV> <DIV><FONT face=Courier size=2></FONT></DIV> <DIV><FONT face=Courier size=2>C FirstRcd SetLL File</FONT></DIV> <DIV><FONT face=Courier size=2>C 1DoSflPag x</FONT></DIV> <DIV><FONT face=Courier size=2>C ReadP File</FONT></DIV> <DIV><FONT face=Courier size=2>C If%eof</FONT></DIV> <DIV><FONT face=Courier size=2>CLeave</FONT></DIV> <DIV><FONT face=Courier size=2>CElse</FONT></DIV> <DIV><FONT face=Courier size=2> <DIV><FONT face=Courier size=2>C Eval RRN = SflPag -x + 1</FONT></DIV>C Write Sfl</FONT></DIV> <DIV><FONT face=Courier size=2>C Endif</FONT></DIV> <DIV><FONT face=Courier size=2>C EndDo</FONT></DIV> <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT></DIV>

Guest.Visitor
04-12-2001, 09:58 AM
You dont need to do a readp for doing page up. Subfile records once filled are still stored in the subfile, until you clear the subfile records. Simple pageup will bring you back the records that are already filled. Remove the codes for rebuilding the subfile using readp. Add records only during page-down. Hope this helps. Elan

mamadou_toure@yahoo.com
04-14-2001, 09:58 PM
Hi, My problem is the following I have a subfile which is loade normally (one page a time), when i perform a page up, the next page is displayed, but when i perform a page down, the first page is displayed but in reverse order . For instance if i have on the first page 1 2 3 and in the second page 4 5 6 If i perform a page dow, the first page is displayed like this : 3 2 1 Please help Kind regards Mamadou

mamadou_toure@yahoo.com
04-14-2001, 09:58 PM
Thanks a lot for your help . I finally find why my subfile was reversed, it was because i used indicators for conditionning some fields . Regards Mamadou TOURE