>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