home *** CD-ROM | disk | FTP | other *** search
- ** END HEADER -- do not remove this line
- //
- // Generated on 09/25/97
- //
- parameter formObj, popupName
- new repviewPOPUP(formObj, popupName)
-
- class repviewPOPUP(formObj, popupName) of POPUP(formObj, popupName)
- with (this)
- onInitMenu = class::popOnInitMenu
- left = 0
- top = 0
- trackRight = true
- endwith
-
-
- this.MENUTOP = new MENU(this)
- with (this.MENUTOP)
- onClick = class::MENUTOP_ONCLICK
- text = "Top Page"
- endwith
-
-
- this.MENUPREV = new MENU(this)
- with (this.MENUPREV)
- onClick = class::MENUPREV_ONCLICK
- text = "Previous Page"
- endwith
-
-
- this.MENUNEXT = new MENU(this)
- with (this.MENUNEXT)
- onClick = class::MENUNEXT_ONCLICK
- text = "Next Page"
- endwith
-
-
- this.MENUSEP1 = new MENU(this)
- with (this.MENUSEP1)
- text = ""
- separator = true
- endwith
-
-
- this.MENUPRINT = new MENU(this)
- with (this.MENUPRINT)
- onClick = class::MENUPRINT_ONCLICK
- text = "Print..."
- endwith
-
- function MENUTOP_onClick
- this.parent.parent.repView.filename := ;
- this.parent.parent.repView.filename
- with ( this.parent.parent.repView.ref )
- startPage := 1
- endPage := 1
- endwith
- return ( this.parent.parent.repView.ref.render() )
-
- function MENUPREV_onClick
- local nPage, rView
- rView = this.parent.parent.repView
- nPage = rView.ref.startPage
- nPage--
- rView.filename := rView.filename
- rView.ref.startPage := nPage
- rView.ref.endPage := nPage
- return ( rView.ref.render() )
-
-
- with ( this.parent.parent.repView.ref )
- startPage--
- endPage := this.parent.parent.repView.ref.startPage
- endwith
- return ( this.parent.parent.repView.ref.render() )
-
- function MENUNEXT_onClick
- with ( this.parent.parent.repView.ref )
- startPage++
- endPage := this.parent.parent.repView.ref.startPage
- endwith
- return ( this.parent.parent.repView.ref.render() )
-
- function MENUPRINT_onClick
- local bPrint
- bPrint = CHOOSEPRINTER()
- if ( bPrint )
- this.parent.parent.repView.ref.output := 1 // printer
- this.parent.report.repView.ref.render()
- this.parent.report.repView.ref.output := 3 // default
- endif
- return ( bPrint )
-
- function popOnInitMenu
- local bRepFound
- bRepFound = ( TYPE("this.parent.repView.ref.startPage") == "N" )
- if ( bRepFound )
- with ( this )
- menuPrint.enabled := true
- menuNext.enabled := ( not this.parent.repView.ref.isLastPage() )
- menuTop.enabled := ( this.parent.repView.ref.startPage > 1 )
- menuPrev.enabled := ( this.parent.repView.ref.startPage > 1 )
- endwith
- else
- with ( this )
- menuPrint.enabled := false
- menuNext.enabled := false
- menuTop.enabled := false
- menuPrev.enabled := false
- endwith
- endif
- return ( bRepFound )
- endclass
-