TechTricks
Technical answers from the trenches 
 
 
 
 

     
   
Controlling Report Magnification at Runtime
 
   
 Posted: 29 Novemeber 2000
 
   
 
 Applies to: All Versions
 
   
 
Audience: Beginner
 
       
   

Question: When viewing a report using interactive Paradox, I can use the View | Zoom menu command to change the magnification used to preview a report. Can I do this at runtime?

Answer: Yes, using ObjectPAL. Here's a sample:

var
   rpt  Report
endVar

   if not rpt.open( "customer" ) then
      errorShow( "Can't Open Report", "Use [>>] for details..." )
   else
      rpt.menuAction( MenuPropertiesZoom50 )
      rpt.wait()
      try
         rpt.close()
      onFail
         ; do nothing; it's already closed
      endTry
   endIf

The following "zoom" constants are available:

   menuPropertiesZoom25Magnifies to 25%
   menuPropertiesZoom50Magnifies to 50%
   menuPropertiesZoom100Magnifies to 100%
   menuPropertiesZoom200Magnifies to 200%
   menuPropertiesZoom400Magnifies to 400%
   menuPropertiesZoomBestFitFits full page on screen
   menuPropertiesZoomFitHeightFits to Vertical margins
   menuPropertiesZoomFitWidthFits to Horizontal margins

 

       

Top

Feedback About Paradox Delphi Assorted Web Stuff
 
 
Copyright © 2000-2004, techtricks.com; All Rights Reserved.
Acknowledgements, Disclaimers, Terms and Conditions.
Article last updated on 31 May 2003

 

Other Sites: Paradox, Delphi, Perl, Web Stuff, and More


 

[- End -]