I use the following code, which I got from this forum a while ago.
loForm = CREATEOBJECT('Form')
loForm.WIDTH = SYSMETRIC(1) * .860
loForm.HEIGHT = SYSMETRIC(2) * .80
loForm.NAME = 'ReportPreview'
loForm.CAPTION = 'Preview'
loForm.AUTOCENTER = .T.
loForm.LEFT = (SYSMETRIC(1) - loForm.WIDTH) /2
loForm.TOP = SYSMETRIC(2) * .0125
REPORT FORM &lcReportForm NEXT 1 NOCONSOLE PREVIEW ;
WINDOW ReportPreview
This suits my purpose fine when run on a monitor with the resolution set to 1024 x 768. On a widescreen, (1920 x 1080), even though the actual report is wider than on the other machine, it takes up only about half the window, but the window takes up almost all of the screen width.
The machine with the smaller monitor is running XP and the widescreen is running Windows 7.
Is there a way to determine how wide the report will be and relate it to the resolution?
Thanks,
Sam
loForm = CREATEOBJECT('Form')
loForm.WIDTH = SYSMETRIC(1) * .860
loForm.HEIGHT = SYSMETRIC(2) * .80
loForm.NAME = 'ReportPreview'
loForm.CAPTION = 'Preview'
loForm.AUTOCENTER = .T.
loForm.LEFT = (SYSMETRIC(1) - loForm.WIDTH) /2
loForm.TOP = SYSMETRIC(2) * .0125
REPORT FORM &lcReportForm NEXT 1 NOCONSOLE PREVIEW ;
WINDOW ReportPreview
This suits my purpose fine when run on a monitor with the resolution set to 1024 x 768. On a widescreen, (1920 x 1080), even though the actual report is wider than on the other machine, it takes up only about half the window, but the window takes up almost all of the screen width.
The machine with the smaller monitor is running XP and the widescreen is running Windows 7.
Is there a way to determine how wide the report will be and relate it to the resolution?
Thanks,
Sam