Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preview Report - Jump to 75% Zoom programmatically
Message
From
16/03/2004 12:59:50
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00885593
Message ID:
00886774
Views:
14
Hi Lisa,
Thanks for replying. Now I just need to somehow get the horizontal scrollbar visible... Here is an example of how we are doing it now (KEYBOARD 'L' works):
LOCAL oPreviewForm
oPreviewForm = NEWOBJECT('PreviewForm', 'Pro32.vcx')

REPORT FORM (m.reportform) WINDOW PREVIEWFORM PREVIEW

oPreviewForm.Release


DEFINE CLASS previewform AS form

	Height = 250
	Width = 375
	Desktop = .F.
	ShowWindow = 2
	ScrollBars = 3
	DoCreate = .T.
	AutoCenter = .T.
	BorderStyle = 3
	Caption = "Print Preview Window"
	ControlBox = .F.
	Closable = .F.
	MinButton = .F.
	Movable = .F.
	WindowType = 0
	WindowState = 2
	AlwaysOnTop = .F.
	Name = "previewform"


	PROCEDURE Deactivate
		DODEFAULT()
		IF WEXIST('Report Designer')
			ZOOM WINDOW "Report Designer" MAX
			MOUSE DBLCLICK AT -0.1,0.1 WINDOW "Report Designer"
Designer"
		ENDIF
		IF WEXIST('Print Preview')
			MOUSE DBLCLICK AT -0.1,0.1 WINDOW "Print Preview"
		ENDIF
	ENDPROC


	PROCEDURE Init
		DODEFAULT()
		THIS.SHOW()
                KEYBOARD 'L'   && WORKS!  75% is perfect
	ENDPROC


	PROCEDURE Activate
		DODEFAULT()
		IF WEXIST('Print Preview')
			ZOOM WINDOW 'Print Preview' MAX
		ENDIF
	ENDPROC


ENDDEFINE
zoom states with the "L" key. Not sure if this would work but you might be able to PLAY MACRO or KEYBOARD a sequence of "L's" just previous to a REPORT FORM PREVIEW command to get the zoom to 75%. NOw that I think about it, it should always be one "L" from the default state of 100%.
>
>The other stuff you want to do with the preview toolbar is probably simpler than you think <g>. However you say you are opening the report in a form and it's difficult to say how to do it without a concrete example. If you post simple steps to repro I'll try to show you.
>
>One thing: I don't think you're using the right method to dock the toolbar, I wouldn't do this with the mouse.
>
>Have you tried:
>
>DOCK WINDOW ("print preview") POSITION 0
>
>Previous to this command you might also have to ensure that the toolbar was visible -- that's easily done with WVISIBLE() -- but if you want to make it visible if it happens not to be (because the user closed it, that's a bit more difficult. I can dig up some code for that if you want it.
>
>>L<
.·*´¨)
.·`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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform