Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a custom size Zoom level in the preview mode

Reports

How to create a custom size Zoom level in the preview mode

by  Mike Gagnon  Posted    (Edited  )
The following code will create a custom size zoom level (beyond to regular 100%) from the FoxUser.dbf. You can adapt this to your own reports.
Code:
PUBLIC oOuter,oInner
CREATE REPORT TEST FROM SYS(2005)
oOuter = CREATEOBJECT("OuterForm")
oInner= CREATEOBJECT("InnerForm")
ACTIVATE WINDOW (oInner.Name) IN (oOuter.Name)
oOuter.show()

KEYBOARD "Z" PLAIN
REPORT FORM TEST PREVIEW IN WINDOW (oInner.Name);
  WINDOW (oInner.Name) NOWAIT NAME oOuter.oEnvironment 
  
DEFINE CLASS OuterForm as Form
    oEnvironment = NULL
  ScrollBars = 3
  ADD OBJECT Dummy as Label WITH top =1000, Left = 1000
  Width = 800
  Height = 600
  PROCEDURE scrolled(tnDirection)
     oInner.Move (-This.ViewPortLeft,-This.ViewPortTop)
  ENDPROC
  PROCEDURE oEvironment_Assign
  LPARAMETERS toEnVironment
   IF ISNULL(toEnvironment)
     oInner.Release()
     oOuter.Release()
   ENDIF
  ENDPROC
ENDDEFINE

DEFINE CLASS InnerForm as Form
  borderstyle = 0
  TitleBar = 0
  Width = 2000
  Height = 4000
ENDDEFINE

By Christof Lange

Mike Gagnon

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top