Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: kyriakos Mylonas
  Where is kyriakos Mylonas?
 
 Cyprus
 kyriakos Mylonas
 Tags
Subject: RE: reports
Thread ID: 365657 Message ID: 365659 # Views: 54 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Saturday, December 29, 2012 11:16:39 AM         
   


Kalimera Kyriakos,

> I have the following coding
>
> _screen.visible=.t.
> report form xxx object rl to printer prompt preview in screen
> _screen.visible=.f.
>
>
> when I run a report first time the message loading the report 'rendering page' appears on my form right corner,and then preview
> report in screen which is what i want.
>
> All other times run reports the above message appears in empty screen.
>
> If exit the system and login again the first time run a report is like above.
>
> what is the problem;
>
> please help


That sounds as if perhaps an additional "Activate Screen" right after the "_screen.visible=.t." line might help?

Or, since _screen.Visible=.F. seems to be the standard in your app, would displaying the preview in a custom as/in-top-level window work better? (see also the runnable demo pasted below)



hth
-Stefan


LOCAL lScreenVisible, lcSetResource
lScreenVisible = _screen.Visible
_screen.Visible = .F.
lcSetResource = SET("Resource")
SET RESOURCE OFF

LOCAL oForm
oForm = CREATEOBJECT('PreviewForm')
oForm.Show()
REPORT FORM (HOME(2)+'Solution\Reports\colors.FRX') PREVIEW WINDOW (m.oForm.Name)
oForm.Release()

_screen.Visible = m.lScreenVisible
SET RESOURCE &lcSetResource
RETURN

DEFINE CLASS PreviewForm as Form
	ShowWindow = 2
	Titlebar = 0
	WindowState = 2
	Icon = Home(2)+'Tastrade\Bitmaps\spplrs.ico'
ENDDEFINE


ENTIRE THREAD

reports Posted by kyriakos Mylonas @ 12/29/2012 10:22:18 AM
RE: reports Posted by Stefan Wuebbe @ 12/29/2012 11:16:39 AM