JavaScript Editor js editor     Web development 

Main Page

Specifies the application used by Visual FoxPro to generate instances of a report preview user interface in order to satisfy requests from instances of the ReportListener class.

For more information on custom report previews, see Extending Report Preview Functionality




Specifies the object factory application invoked by Visual FoxPro.
If the application is located in a directory other than the current default directory, include a path name with the program name.


By default, _REPORTPREVIEW refers to ReportPreview.App, located in the main Visual FoxPro directory.

You can also specify an application to use in _REPORTPREVIEW using the File Locations tab in the Options dialog box. For more information, see File Locations Tab, Options Dialog Box.

The application in _REPORTPREVIEW is passed a NULL reference parameter, into which it must place an object reference to an instance of a class supporting the The Preview Container API. The application must then terminate, returning the Preview Container object reference:

В Copy Code
pc = .NULL.

The variable pc will now contain an object reference.

Consider the following statements:

В Copy Code
    rl = NEWOBJECT("Reportlistener")
    rl.ListenerType = 1
    REPORT FORM customers.frx OBJECT rl

When Visual FoxPro executes these commands, it checks the Reportlistener's PreviewContainer property for a valid object reference. If it does not find one, it obtains one by calling the _REPORTPREVIEW application.

Visual FoxPro will generate an error if it does not locate an application for _REPORTPREVIEW during a report preview.

When distributing report preview factory programs with your applications, you may find it convenient to explicitly set _REPORTPREVIEW in the Visual FoxPro configuration file, Config.fpw. For more information, see Including Report Files for Distribution and Setting Configuration Options at Startup.


The following line of code sets the _REPORTPREVIEW system variable to the default Report Preview application:

В Copy Code

See Also

JavaScript Editor js editor     Web development