In order to deploy VFP 9.0 object-assisted report features in runtime, the REPORT*.APP files have to be distributed with your application and their location stored into _REPORT* system variables.
The error 'Variable _REPORTOUTPUT is not found' may be generated if they are not populated properly.
_REPORT* system variables
File |
System Variable |
Notes |
REPORTOUTPUT.APP |
_REPORTOUTPUT |
|
REPORTPREVIEW.APP |
_REPORTPREVIEW |
|
REPORTBUILDER.APP |
_REPORTBUILDER |
Optional. Gives user access to the Report Designer in runtime |
NOTE: The
MSXML 4.0 is required for XML/HTML Report Listeners.
When files are in application directory or anywhere on VFP search path, following code can be added to the application main program to populate _REPORT* variables.
$SAMPLECODE$
1
2
3
4
5
6
7
8
9
10
|
* Report output
_REPORTOUTPUT = FULLPATH("REPORTOUTPUT.APP")
* Report preview
_REPORTPREVIEW = FULLPATH("REPORTPREVIEW.APP")
* Report Writer
_REPORTBUILDER = FULLPATH("REPORTBUILDER.APP")
|
When files are in the same directory as VFP runtime DLLs, HOME() function would return their location.
$SAMPLECODE$
1
2
3
4
5
6
7
8
9
10
|
* Report output
_REPORTOUTPUT = HOME() + "REPORTOUTPUT.APP"
* Report preview
_REPORTPREVIEW = HOME() + "REPORTPREVIEW.APP"
* Report Writer
_REPORTBUILDER = HOME() + "REPORTBUILDER.APP"
|
Comments
Use 2 different reportpreview.app
Thanks
It's easy to re-point