Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report preview window and screen resolution

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
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
 
Setting the window state to 2 makes the window even wider.

I would like to be able to make the window just a bit wider than the displayed report.

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top