Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 9 Report tool bar gone
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01317159
Message ID:
01317409
Views:
9
Sergey,
many thanks for the pointers. At some point I need to do just that. I just don't have the time right now as we are trying to get a massive update out to hundreds of people right now and only a few of the reports have been converted to 90 so far. I did come up with the code below that works for now. (See below your example)

>Check Colin's article Exploring and Extending Report Previewing in VFP9
>
>Basically you can instantiate a preview container and configure it the way you like
>
>loPC = NULL
>DO (_REPORTPREVIEW) WITH loPC
>loPC.ToolbarIsVisible = .T.
>loRL = CREATEOBJECT("ReportListener")
>loRL.ListenerType = 1
>loRL.PreviewContainer = loPC
>lcReport = HOME(2) + "Solution\Reports\wrapping.frx"
>REPORT FORM (lcReport) OBJECT loRL
>
>
*
PROCEDURE lForce90PreviewToolBar
*
lParameters mFrxfile
*
* mFrxfile = Name of FRX file
*
* ===========================================================
*  Force the report preview toolbar to show.  
*
*  With SET REPORTBEHAVIOR 90 if the user closes the toolbar 
*  it will not show next time.  This fixes the problem.
*  5-15-2008 jjh
* ===========================================================
*
* Following settings are only when SET REPORTBEHAVIOR 90 
*
* ID   field = 9REPPREVIEW for VFP 9 report preview settings.
* NAME field = name of report frx file. ie: RPTAACMA.FRX
* DATA field = preview settings:
*
* Example Contents of the Data memo field in the resource file.
* --------------------------------------------------------------
* PreviewForm.Top = 72
* PreviewForm.Left = 11
* PreviewForm.Width = 744
* PreviewForm.Height = 543
* PreviewForm.WindowState = 0
* PreviewForm.ToolbarIsVisible = .F. -->If this is .F. tool bar will not show.
* PreviewForm.CanvasCount = 1
* PreviewForm.ZoomLevel = 5
* PreviewToolbar.Top = 0
* PreviewToolbar.Left = 0
* PreviewToolbar.Width = 417
* PreviewToolbar.Height = 48
* PreviewToolbar.DockPosition = -1
*
* ===========================================================
*
Local mSelect, mData, mSearchString, mStart
mSelect = select()
select 0
use (sys(2005)) again alias temp
locate for id = "9REPPREVIEW" and name = mFrxfile
if found()
  mData = data
  mSearchString = 'PreviewForm.ToolbarIsVisible = .'
  mStart = atc(mSearchString, mData) + len(mSearchString)
  if mStart > 0
    mData = stuff(mData, mStart, 1, 'T')
    replace data with mdata
  endif
endif
use in temp
select (mSelect)
*
RETURN
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform