| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > PrintPreviewClass > PrintPreviewClass Methods >====== AskPage (prompt for new report page) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[printpreviewclass functional organization expected use.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[askprintpages prompt for pages to print .htm|{{btn_next_n.gif|Next page}}]] | | || **AskPage, PROC, VIRTUAL, PROTECTED** {{blk2blue.jpg|blk2blue.jpg}} The **AskPage **method prompts the end user for a specific report page to display and returns a value indicating whether a new page is selected. A return value of one (1) indicates a new page is selected and a screen redraw is required; a return value of zero (0) indicates a new page is not selected and a screen redraw is not required. **Implementation:** The PrintPreviewClass.Display method calls the AskPage method. The AskPage method displays a dialog that prompts for a specific report page. **Return Data Type:     **BYTE **Example:** **!Virtual implementation of AskPage: a simplified version with no translator...** **PrintPreviewClass.AskPage FUNCTION** **JumpPage LONG,AUTO** **RVal     BOOL(False)** **JumpWin WINDOW('Jump to Page'),AT(,,181,26),CENTER,GRAY,DOUBLE** **     PROMPT('&Page:'),AT(5,8),USE(?JumpPrompt)** **     SPIN(@n5),AT(30,7),USE(JumpPage),RANGE(1,10),STEP(1)** **     BUTTON('OK'),AT(89,7),USE(?OKButton),DEFAULT** **     BUTTON('Cancel'),AT(134,7),USE(?CancelButton)** **    END** ** CODE** ** JumpPage=SELF.CurrentPage** ** OPEN(JumpWin)** ** ACCEPT** **  CASE EVENT()** **  OF EVENT:OpenWindow** **   ?JumpPage{PROP:RangeHigh}=RECORDS(SELF.ImageQueue)** **  OF EVENT:Accepted** **   CASE ACCEPTED()** **   OF ?OKButton** **    IF JumpPage NOT=SELF.CurrentPage** **     RVal=True                   !SELF.CurrentPage changed** **     SELF.CurrentPage=JumpPage** **    END** **    POST(EVENT:CloseWindow)** **   OF ?CancelButton** **    POST(EVENT:CloseWindow)** **   END** **  END** ** END** ** CLOSE(JumpWin)** ** RETURN Rval**