Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Preview in Form and Margins
Message
From
03/03/2004 16:03:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Report Preview in Form and Margins
Miscellaneous
Thread ID:
00882889
Message ID:
00882889
Views:
53
If you preview a report in a form and click on the image to zoom and then click on the image again to grow it to 100 percent again, a large margin displays from that point on on all sides of the report inside the preview window. Why is that and how can I get rid of the margin?

Note: this example requires you to create the table testit once at least and to create a report named testit. The fields and data do not matter.
SET SAFETY OFF
IF WEXIST('STANDARD')
	HIDE WINDOW STANDARD
ENDIF

_screen.width=720
_screen.height=460

CREATE TABLE testit (cid c(10))
SELE testit
FOR i = 1 TO 100
	APPEND BLANK
	REPLACE testit.cid WITH ALLTRIM(STR(i))
ENDFOR

*--Create a simple report name testit so you can run this part
m.reportform = 'testit'

LOCAL oPreviewForm
oPreviewForm = NEWOBJECT('PreviewForm')

REPORT FORM (m.reportform) WINDOW PREVIEWFORM PREVIEW

oPreviewForm.Release

USE IN testit

RETURN 


DEFINE CLASS previewform AS form


	Top = 0
	Left = 0
	Height = 250
	Width = 375
	ScrollBars = 3
	DoCreate = .T.
	Caption = "Print Preview Window"
	WindowState = 2
	controlbox = .F.
	setstatus = "''"
	Name = "previewform"


	PROCEDURE GotFocus
		this.windowstate = 2
		DODEFAULT()
	ENDPROC


	PROCEDURE Deactivate
		MOUSE DBLCLICK AT -0.1,0.1 WINDOW "Print Preview"
		DODEFAULT()
	ENDPROC


	PROCEDURE Init
		thisform.setstatus = SET('STATUS BAR')
		set status bar on
		DODEFAULT()
		this.show()
		KEYBOARD '{CTRL+F10}' 
	ENDPROC


	PROCEDURE Show
		LPARAMETERS nStyle
		this.windowstate = 2
		DODEFAULT()
	ENDPROC


	PROCEDURE Release
		IF !EMPTY(thisform.setstatus)
			PRIVATE lcstatusbar
			lcstatusbar = THISFORM.setstatus
			SET STATUS BAR &lcstatusbar
		ENDIF
		DODEFAULT()
	ENDPROC


	PROCEDURE QueryUnload
		IF !EMPTY(thisform.setstatus)
			PRIVATE lcstatusbar
			lcstatusbar = THISFORM.setstatus
			SET STATUS BAR &lcstatusbar
		ENDIF
		DODEFAULT()
	ENDPROC


ENDDEFINE
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Reply
Map
View

Click here to load this message in the networking platform