Not entirely ideal, but a quick-and-dirty solution is to issue
keyboard "{Ctrl+F10}" before showing the preview.
>I'm obviously missing something here, but I'm just not seeing it right now; maybe someone can help.
>
>I'm trying to automatically size the report preview container during a preview. I'm using code similar to this:
>
>
>LOCAL loPreviewContainer, ;
> loListener, ;
> lcReportPreview
>
> DO (_REPORTPREVIEW) WITH loPreviewContainer
>
> WITH loPreviewContainer
> .AllowPrintFromPreview = .F.
> .Top = _screen.Top
> .Left = _screen.Left
> .Width = _screen.Width
> .Height = _screen.Height
> ENDWITH
>
> loListener = CREATEOBJECT("ReportListener")
> loListener.PreviewContainer = loPreviewContainer
> loListener.ListenerType = 1
>
> REPORT FORM Sample OBJECT loListener
>
>
>The option to disable printing from the preview works, but sizing the preview screen doesn't. What the heck am I missing?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)