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