VFP 9.0 Report Features in Runtime
By Sergey - Posted on January 1st, 2008
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.
| 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.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
&& 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.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
&& Report output _REPORTOUTPUT = HOME() + "REPORTOUTPUT.APP" && Report preview _REPORTPREVIEW = HOME() + "REPORTPREVIEW.APP" && Report Writer _REPORTBUILDER = HOME() + "REPORTBUILDER.APP"
How can I use two reportpreview/reportoutput.app in one application. I have one reportpreview wherein I can search/find text, but it gives relation error when I am using multiple detail band, so I was thinking of using regular reportpreview for report of Multiple Detail band & another one with search option for remaining reports.
Thanks
It's easy to re-point _REPORTOUTPUT and _REPORTPREVIEW to different .APPs but it'll not do any good because of VFP caching. Even if it worked, it would be a kludge not a solution. You should figure out the reason for the error and fix the cause of the problem.