Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to have the Report toolbar docked always
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00708967
Message ID:
00709234
Views:
32
This message has been marked as the solution to the initial question of the thread.
>hello
>
>Is it possible to have the Report toolbar docked always when the users select preview.
>
>thanks

The position of the toolbar is stored in the resource file. Therefore, if you create a special read-only resource file with the toolbar docked, you can set the resource to the special file just prior to running the report and then set it back when you're done.

Create the resource file as follows:
*-- Execute this code to create
*-- an empty resource file
SET RESOURCE OFF
USE SET('RESOURCE',1)
COPY TO PrntUser
USE Junk EXCLUSIVE
ZAP
USE
SET RESOURCE TO PrntUser
Now that this resource file is active, preview a report and dock the toolbar where you want it. When done, do the following.
SET RESOURCE TO
Now mark the file as read-only and include it in your application. When you want to run a report, do it as follows:
* Set the resource file to the special printer resource file
LOCAL lcResourceTo, lcResourceOnOff
lcResourceOnOff = SET('RESOURCE')
lcResourceTo = SET('RESOURCE',1)
SET Resource TO PrntUser

* Print the report
REPORT FORM MyReport PREVIEW

IF WEXIST('Print Preview')
  RELEASE WINDOWS 'Print Preview'
ENDIF

* Restore the resource file
IF EMPTY(lcResourceTo)
	SET Resource TO
ELSE
	SET Resource TO (lcResourceTo)
ENDIF
SET Resource &lcResourceOnOff
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform