Validation of Type: Function Returning Error TextįOR i IN 1. This is a validation based on the idea from Denes Kubicek. If a select list value is already set within a row then this id should not be displayed in any other row anymore.įor question one I found an answer myself. It must be some kind of validation check. I only want that a select list entry get selected ones not several times. I'm currently have some questions about TABULAR FORM validations. HTP.p ('Content-Disposition: attachement filename="my_xls_doc.xls"') HTP.p ('Content-Length: ' || DBMS_LOB.GETLENGTH(lob_loc)) OWA_UTIL.mime_header ('application/xls', FALSE) Your table element should look similar to this:ĭBMS_LOB.WRITE(lob_loc, LENGTH(:P1_EXPORT_DATA), 1, UTL_RAW.CAST_TO_RAW(:P1_EXPORT_DATA)) HTML Form Element Attributes: style="display:none " Of course my pivot table is build up as plug-in and selects data from my project data tables.Īll you need to do is to get the table element (including all html code) from your rendered page and write it into a blank XLS-file. In my case I created an export based on this pivot table output: It supports all kind of report views as long as they are build as tables. It doesn't require any special printing engine and should work even with Excel 2003. It would also be possible to get the map with a plain PL/SQL region, but the creation of a plugin for that has some advantages, such as reusability within your own application and the ability to share the plugin with others.There is a quite easy way to generate nice looking Excel files based on your APEX reports. I hope this example shows how relatively easy it is to generate a nice map with some markers on it. Line 69 creates the instruction to call the JavaScript-function once the page has been loaded. Each marker gets a popup with the name of the train station. For every train station, a marker will be placed on the map using the lat and lon coordinates. On lines 47 to 63, JavaScripts lines are generated with a PL/SQL loop. Lines 42 to 64 create a JavaScript function that will do the “magic” of creating the map, and center it at the right point and zoom level. On line 40, the div-element is created, which will actually hold the map. Next, the apex_css and apex_javascript packages are used to generate the HTML code that will include the required CSS and JavaScript files. Once the collection is populated, I’m using the data set first to define the center of the map (line 23-29). I used an APEX collection to get this data set (line 16-22). When rendering the map, this query needs to be executed in order to use the data set. This query can be supplied as Custom Attribute in this plugin. Since I wanted to use a data set to supply the markers that will be placed on the map, a query is needed to deliver the data set. The PL/SQL variables used in the function (line 6-12) are needed to hold the values calculated in PL/SQL and blend them in JavaScript later on. The function has a pre-defined signature with parameters, that will pass on the settings a developer can make when using the plugin on an APEX page (lines 1-4). We will have a closer look at the PL/SQL code: Here, you will generate the HTML and JavaScript needed to render the map and the markers. The “Source” of the plugin is actually the part where the magic happens. Let’s check out the contents of the “OpenStreetMap with Leaflet Plugin” (after you imported the plugin): You can import plugins and view the contents of the plugins by going to the Shared Components of your application and clicking on “Plug-ins”. You can see the result on my sample application, where you can also download the plugin. I used the APEX Web Source Module to retrieve the data set. This data set is basically a list of Dutch train stations, containing the name, latitude and longitude of the train stations. My first goal is to create a map in APEX where markers are shown based on a data set. There is a Youtube video that shows how to create an APEX plugin step by step, but I started by looking at the existing OpenStreetMap plugin created by Dmytro Zarezenko. I decided to have a closer look at the OpenStreetMaps plugin, because I like OpenStreetMaps and you don’t need an API-key to use it. When looking for alternatives, I found a really nice plugin based on Google Maps, and also a basic plugin based on OpenStreetMaps. In the Geolocation Showcase sample application, Oracle created their own “Oracle HTML5 Maps - Region” plugin based on their own Oracle eLocation Service maps, but this plugin is not available on APEX plugins page and the maps are not so easy to use. Aside from this, it’s also quite a hassle to use. In the current 19.2 version of APEX, it does not even seem to work anymore. One of the few things I don’t like in Oracle Application Express is the Map Chart component.
0 Comments
Leave a Reply. |