How to run a VRW report from the Web
by Bob Worsley
This add-on to the AJAX Order Entry Example marries two VDF products, Ajax and Visual Report Writer (VRW). The goals are as follows:
Run a VRW report from an AJAX Web application
Provide a choice to the user for outputting a PDF, CSV or graphic (PNG) file
Show the PDF or PNG file on an ASP page
|Size: 57 KB
How to run a VRW report from the web
by Bob Worsley
A number of new to Ajax developers have asked how to run a report from an ASP screen. This project is an Ajax Order Entry add-on that demonstrates one way to do this.
This update was developed in VDF-16.0 using Ajax 2.2.
Begin by extracting the zip into the VDF 16.0 Ajax Order Entry example workspace using the "Folder Names option. Two new folders, "VRW Reports" and "AppHtml\Output_Files" will be created. A Word doc that explains the entire add-on is in the VRW Reports directory.
Open the Ajax Order Entry workspace in the Studio and add the VRW library to the workspace.
Recompile and run the Ajax Order Entry example and choose "VRW Orders List" from the reports menu. All entries can be left blank to see all records, or enter dates and/or customer to see filtering in action.
Since VRW is not a product written specifically for the Web, the report output will first be to disk in the form of a PDF, CSV or PNG file depending on what is selected. Report output will be to the AppHtml\Output_Files directory because a file that is to be shown in an ASP page needs to be able to be found by the browser when it comes time to render it. If a physical location on a hard drive is specified, even on the server, most likely a browser at a workstation will never be able to find it. File locations must be specified in terms of the virtual directory so one logical place for the output directory would be below the virtual directory.
Once the report has been run you will be prompted to show PDF or PNG output in an ASP page.
If you open the output file, be sure and close it before rerunning the report or any changes will not be seen because an open file cannot be overwritten.
~ 57 kB