Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report preview toolbar hidden behind user-defined window
Message
From
08/05/2003 09:20:14
 
 
To
08/05/2003 07:49:14
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00786142
Message ID:
00786196
Views:
31
Other than following the FAQ and modifying the foxuser.dbf, I typically define the window based on screen resolution (in a common function that is called before running reports) such as below (it's your code modified, to test it you should have 800x600 screen resolution):
Local myresource
myresource=sys(2005)
Local myresourcestat
myresourcestat=SET('RESOURCE')

Local lcResourceFileStem
If '05.'$Version() && Foxtools required in VFP5
	Set Library To Home()+'foxtools.fll'
Endif
Set Safety Off

lcResourceFileStem = Addbs(Justpath(Sys(2005)))+Juststem(Sys(2005))
Set Resource Off
* Copy the current resource file to NoPrint which is
* used to store changes to the Print Preview toolbar.
Set Safety Off
Copy File (lcResourceFileStem + ".dbf") ;
	TO noprint.Dbf
Copy File (lcResourceFileStem + ".fpt") ;
	TO noprint.fpt

* Remove current settings by deleting all records in the table.
Use noprint.Dbf Exclusive
Zap
Use
Close All

* Create a table to use for a simple report and put some data in it.
Delete File PrintTest.Dbf
Create Table PrintTest (Name C(30), Address C(20), City C(20), State C(2))
Insert Into PrintTest Values ("Jodie Garber", "1234 Jones St", "Phoenix", "AZ")
Insert Into PrintTest Values ("Holly Johnson", "675 Smith St", "Chicago", "IL")
Insert Into PrintTest Values ("Jack Reacher", "968 Duvall Street", "Key West", "FL")
Insert Into PrintTest Values ("Beau Borken", "1515 Main St", "York", "MT")

* Create a report and preview it.
Create Report PrintTest From PrintTest Column
Use In PrintTest
Set Resource To noprint.Dbf

* my report window definition
DO CASE
	CASE sysmetric(1)>=885 .and. sysmetric(2)>=615
                *Add a different window definition for this size
	CASE sysmetric(1)>=800 .and. sysmetric(2)>=600
		Define Window REPORTWINDOW At 10,1 Size 35,95 In Desktop Float Grow Zoom Close System
	CASE sysmetric(1)>=640 .and. sysmetric(2)>=480
                *Add a different window definition for this size
ENDCASE

IF WEXIST('REPORTWINDOW')
     Report Form PrintTest Window REPORTWINDOW Preview Nowait
     Release Windows REPORTWINDOW
ENDIF

If '05.'$Version() && Turn off Foxtools in VFP5
	Set Library To
Endif
SET RESOURCE OFF
SET RESOURCE TO &myresource
SET RESOURCE &myresourcestat
Return
.·*´¨)
.·`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