Hi,
I'm putting together my first APEX application (v 3.1.2.00.02) and have a requirement that I'm not fully sure how to implement.
Basically, I have a page where a user can select a group of Buildings they want to validate. The Buildings have an x, y coordinate as SDO_GEOMETRY and some other attributes. At the moment, they select from a drop down box and I run an SQL query which does the validation and I present the results in a Standard Report table. That's all fine.
Now there is a requirement to output the results of the report in a different text based format (called a Browse file), which another desktop application can consume to direct the user to the buildings that need to be fixed. I've included an example of this output below.
So I want to display the existing Standard Report table and also have a link to download the Browse file. I can use a stored procedure to write the output for the Browse file, but I'm not sure how to make this available for download.
I could use UTL_FILE to write out the Browse file to a location on the server, but then I'm not sure what to do then.
I'm having a look at the file download section of the [HTTP Server mod_plsql User's Guide|http://download.oracle.com/docs/cd/B19306_01/server.102/b14337/concept.htm#i1005866] but before I get too deep into it, I wanted to check if anybody has any better ideas of how to implement this.
Any help would be much appreciated,
Reggie
The Browse file format will be as follows:
BROWSE VERSION 1.0
ELEMENT
TAG "INPUT PARAMETERS"
COMMENT "REVIEW operation executed on SAMPLE_BUILDINGS"
COMMENT "4 elements logged from SAMPLE_BUILDINGS"
ELEMENT
TAG "ERROR"
COMMENT "Building Point Outside Polygon"
LOCATION 674444.431 696112.632
ELEMENT
TAG "ERROR"
COMMENT "Building Point Overlaps Road"
LOCATION 675419.950 697391.195
ELEMENT
TAG "ERROR"
COMMENT "Duplicate Building Point"
LOCATION 674205.041 697364.946
ELEMENT
TAG "ERROR"
COMMENT "Building Point with no Address"
LOCATION 675215.807 697178.701
{code}