How to allow a user to download a custom report generated from pl/sql?

Hello

I am putting together my first app APEX (v 3.1.2.00.02) and I have a requirement that I am not completely sure that the implementation.

Basically, I have a page where the user can select a set of buildings that they validate. Buildings have an x, ordered as SDO_GEOMETRY and a few other attributes. For now, they select from a dropdown list and I run a SQL query that performs validation and I present the results in a table of Standard report. That everything is perfect.
Now, there is a requirement to the release of the results of the report in another text running format (called a consultation file), with another desktop application can consume to direct the user to the buildings that need to be corrected. I've included an example of this output below.
I so want to see the existing Standard report table and also have a link to download the file in. I can use a stored procedure to write output to the file of consultation, but I don't know how it is available for download.
I could use UTL_FILE to write the browse file to a location on the server, but then I don't know what to do next.

I'll have a look at the download section of file of the [the server HTTP mod_plsql User Guide | http://download.oracle.com/docs/cd/B19306_01/server.102/b14337/concept.htm#i1005866] but before we get too deep into it, I wanted to check if anyone has any better ideas how this implementation.

Any help would be appreciated,
Reggie


The format of file browse 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}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

You can use a procedure like this to allow a download of your file stored as a bfile type (in a directory):

   PROCEDURE download_bfile (
      file_in        IN   VARCHAR2 DEFAULT 'test.txt',
      directory_in   IN   VARCHAR2 DEFAULT 'DATA_PUMP'
   )
   AS
      lob_loc    BFILE;
      v_mime     VARCHAR2 (48) DEFAULT 'application/txt';
      v_length   NUMBER;
   BEGIN
      lob_loc := BFILENAME (directory_in, file_in);
      v_length := DBMS_LOB.getlength (lob_loc);

      OWA_UTIL.mime_header (NVL (v_mime, 'application/octet'), FALSE);

      HTP.p ('Content-length: ' || v_length);

      HTP.p (   'Content-Disposition:  attachment; filename="'
             || SUBSTR (file_in, INSTR (file_in, '/') + 1)
             || '"'
            );

      OWA_UTIL.http_header_close;

      WPG_DOCLOAD.download_file (lob_loc);
   END download_bfile;

To perform this procedure of work of the Summit, you can use approach similar to the following:

http://Apex.Oracle.com/pls/OTN/f?p=31517:15

You can also have a look at this thread:

Re: Need help with the analysis of a Blob in a Table

It will give you lots of ideas how this problem could be solved.

Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
-------------------------------------------------------------------

Tags: Database

Similar Questions

  • How to allow a user to save a form completed (and now unmodifiable) created in Adobe Acrobat DC?

    How to allow a user to save their form to fill out (that I created in Adobe Acrobat DC) so that the fields are more editable when they return the form by e-mail?

    If you submit a script, ASP.net server (see example below), you can merge and/or "Flatten" the form of PDF with iTextSharp for .NET platforms. You can also flatten the PDF with iText JAVA platform. You can also create Adobe's JavaScript action button validate before submitting it to an email that goes through the fields, making them 'read-only '; but, the ReadOnly property can easily be retroconcu.

    Note: Submission to a script on the server also side bypasses software email client side and send the request using an SMTP account.

    See the #3 example:

    www.pdfemail.NET/examples/

  • How to allow the user return to give lectures when they take a quiz?

    Hello world

    I'm new to Captivate and now I'm kinda in a dilemma. Thank you for your
    time to look at my post!

    I created a CBL in Captivate 3, the first 10 slides is a conference and he
    is followed by a quiz of 10 slides, defined as standard SCORM.

    I want that the learner must be able to refer to the Conference when they
    Take the quiz, I tried 2 approaches and they both
    issues in different ways.

    Approach 1: "allow moving backwards" and "infinite attempts. The
    problem with this approach is when the learner clicks on "review the.
    quiz"and when they click"back"on the first slide of questionnaire, all
    Quiz will start everywhere, the score is reset to zero.
    Because the quiz is seeing this as a new attempt and that the learner is
    permit to make "infinite attempts" such that it has been configured.

    Approach 2: "Allow moving backwards" and leave only "1 attempt.
    The problem with this approach is, when the learner is in the Middle
    Quiz and refers to the Conference, the quiz will be
    automatically shown as completed. And the learner will not get a
    chance to answer these questions unanswered.

    It seems that every time that I leave the learner refer to the Conference
    in the middle of a quiz, the quiz will be seen as completed. Who am
    I did wrong? Is there a better approach I can "allow backward
    movement' and always allow resumes user their quiz where they have left
    in the distance?

    Sorry for the long post, I was not able to express it in a more
    concisely.

    Any help is really appreciated!

    -David

    What you see is the behavior designed as in Captivate for the quiz.

    Each Captivate movie has a range of "quiz", which starts with the first measurable purpose and ends at the Quiz results slide.  If you enter the scope of quiz by starting a slide of questionnaire, then jump back away from quiz, to return to the basics, default behavior of Captivate is to freeze the quiz at this time here.  Then when Captivate refers to allow movement to the rear, it is talking only a move backward in the quiz.

    For example, if you get to question 1, but no answer and proceed to question 2 answer that we can go back to question 1, you will still be able to answer question 1.  The test will not be frozen.  However, if you had jumped to any slide before question 1, your quiz would have been frozen with everything that you mark had accumulated at this time here.

    There may be a workaround that you can use to get closer to what you want.  As any object that is classified as part of the quiz, you can add a button on one of the first slides that the user must click to move forward.  Set the properties of this button (or click on the box) to report a score for the quiz.  What makes a part of the scope of quiz.  Now, any content slides falling after this slide button are also within easy reach of quiz and return to them will not have the same effect of freezing the quiz.

    Please keep in mind another aspect of the quiz questions: If you answer a quiz question, and then move off the slide (forward or back) quiz question answer is frozen and cannot be modified unless resume you the Quiz or raise all of the module.

    Hope this helps to clear up how things work.

  • How to allow standard users to install and run games?

    I want to enable a standard to install and run games and such user account but I keep getting guests for an admin password, I tried to disable UAC, but I'm now just get guests who say that the administrator can install only. I would like to be able to do this without having to turn off UAC.

    You must have administrator rights to install anything, period.  Trying to allow standard users just did, it's as if we were trying to be a little bit pregnant. :-)

  • How to allow the user to filter the report data?

    I read a lot of entries on this topic related to interactive reports. From what I can tell, the version we are on... 3.0.1.00.08, does not have the 'classic' vs 'interactive '. So, can someone recommend the best way for me to allow the user to filter report results? Specifically, the user wants to be able to see only active records, but I also want that they want to see all documents (active and inactive).

    Thank you
    Kristina

    Kristina,

    You can add a list "select" to your page. Calling it something like P1_LIST and add it to your where clause as...

    select
    col1,
    col2,
    col3
    from table
    where col2 = decode (:P1_LIST, '-1', col2, :P1_LIST)
    

    You can set the LOV to auto-submit or have a 'Send' button so that your report is filtered according to the value of P1_LIST.

    Also, in the properties of your selection list, set the 'Null view' to 'Yes', 'Display Null value' to something like 'ALL' (or whatever text you want) and the "Null return value'-1 (or whatever value you have in decoding).

    I hope this helps.

    -Chris

  • How to set the size of text with the report generator

    Hello.

    I'm trying to set the size of the text with the report generator, but I find that I can't do this. Here is an example of the code that I use. Can someone tell me what I'm doing wrong please?

    Thank you, Alec

    I was generation from a word template.

    I hacked my version of the Toolbox to give me maunal indicator control "model? He had obtained his permenatly self stuck on "T". I exposed this flag outside the API, so I can control under certain weather conditions I may or may not use the model police.

    Does anyone know how to use this toolkit, or I did the right thing?

    Cheers, Alec

  • How I allowed my app to download to some consumers?

    Hello world

    I am currently having a community of users (about 6,000) be the only persons permitted to download an app on the App Store. I want to know if I can, as in the example, create the App and charge it with special features that says, for example only Apple ID "[email protected]" with password "12345abcde" can download, create my own Apple ID and send it to my 6,000 members of the community and have only the first 6,000 to be allowed to download so if they send email , it's first come, first served.

    If it is possible, then the next question is: can I change the user and password to allow access to some people more, or do I have to download another version of the app or a new application for this?

    The app will be free.

    Anyone who can enlighten us, we appreciate it.

    iPad, iOS 6.1.4

    You have a business account? If this is not the case, this can be done.

  • How to allow the user to enter only alpha numeric characters in the text field?

    Hello

    Is it possible to restrict the user to enter only alpha numeric characters in the textfiled?

    Thank you

    Starting from the version 4.7, I don't see any how useful filter adapted to your needs.  Then why don't you override keyChar() like this:

    EditField eField = new EditField("Enter letters and digits only: ", "") {
        protected boolean keyChar(char ch, int status, int time) {
            if (CharacterUtilities.isLetter(ch) || CharacterUtilities.isDigit(ch) || (ch == Characters.BACKSPACE)) {
                return super.keyChar(ch, status, time);
            }
            return true;
        }
    };
    

    I have not tested this code, but you can give it a shot...

    You can add a manipulation (or super.keyChar...) for Characters.ENTER and Characters.ESCAPE, as well as anything else you be useful, such as the comma and the period.

    Hope this helps,

    Arkady.

    Edit: added Characters.BACKSPACE - you want to change, not you?

  • How to allow multiple users to view alerts generated by a single user

    Hello

    I created some alerts in the log Insight 3.0 and I want my colleagues to be able to see and modify.  Is this possible?  If so, how can I do it?

    Thank you.

    Shared alerts do not exist today. The workaround is to create a shared user that several people can connect to. For more information, see: 3 reasons to use a Service account in the journal Insight - SFlanders.net

  • How to allow the user to insert an image file

    Pro 10 using when I test in pro I can insert any file that I like, when I try in the drive I can only select the PDF files.

    Also on a side note how do I give them the opportunity to see the clear image button I know this isn't event.target.buttonClearIcon ();

    It's the JS I use

    Prompt the user to select the file to display on the button

    event.target.buttonImportIcon ();

    Evil. It will work in Reader (XI or higher), but you will only be able to select the PDF files as the image. 'S done it on purpose by Adobe.

  • How to allow a user to view all the tables from another schema?

    I have a 'vic4ever' scheme where I have created all my tables. Now, I create a new user named "nvvp1". So, I want to enable nvvp1 display all tables in a schema vic4ever. But I don't know how to do! Or I need to run this command for each table?
    Grant select on vic4ever.table1 to nvvp1;
    Grant select on vic4ever.table2 to nvvp1;
    ....

    Thank you

    Yes, that's what you have to do, but you could speed up a bit:

    BEGIN
    FOR cur_rec IN (SELECT table_name FROM ALL_TABLES WHERE UPPER(owner) = 'NVVP1')
      LOOP
        EXECUTE IMMEDIATE 'Grant select on vic4ever.' || cur_rec.table_name || ' to nvvp1';
      END LOOP;
    END;
    /
    
  • Windows 7 - How to allow a user access to the computer at a program that has been installed as a local user

    I have a professional Windows 7 operating system and have a program that was installed when the user is logged on as a local user.  Is it possible to give the same user rights to run this program without having to reinstall the program when the user is connected to the domain?

    Thanks for any help you can provide.

    Microsoft Answers is for consumers to related issues and it would be preferable for you to post in the following TechNet forum.

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    Sincerely,

    Marilyn

  • How to allow the user to set the focus on each and areas of multiple text on stage?

    I have several text boxes on stage and for the purpose of their scroll by wheel, I would like the user to focus on one of its choice, either by the mouse tab.

    The best I could find is the setAttribute method, coupled with the value of the tabindex property, in which the number 1 represents the first and the highest element in the hierarchy.

    Not sure that this is the right way forward on this issue, and if this is the case, I'm probably something wrong, as usual. I tried:

    this.my_textArea.setAttribute("tabindex","1");
    

    and I get back:

    Eception TypeError: this.my_textArea.setAttribute is not a function

    This detail really should have been mentioned in your first post. So, I'm going to guess that the simple code NOT simulates a true textarea (because the textarea elements permit an entry), but rather is just a hidden textfield, set up to monitor the mousewheel events. You won't be able to give these things focus just a variable assignment, because they have no concept of development. The only way to do this is to add more code to handle.

  • Is it possible to create a form requesting an email address before allowing the user to download something?

    My client would like to some testimonials on their site, but before the visitor can view that they would like to ask a few details such as an email address and list name.

    Is it possible to create a form that asks this information then opens to the top of the web page / download link to display the required information.

    Thank you very much.

    Yes. Commit email and address a required field and a link to the page of download "sent successfully."

  • How to allow a user to resize an image field

    Hi all

    I was wondering if it is possible to resize an image field based on user input. I am currently using a workaround solution by creating a set of radio buttons that each have an action which they are attached and which will define the width and height of the image field. However, this option is limited and not as effective as I'd like. Is it possible to create a kind of variable so that the height and width of an image field is defined by the values that the user enters in numeric fields? This way users could set the width and the height of their image fields.

    For more information, I am working in Livecycle Designer ES2

    Please check the solutions of Niall.

    http://www.assuredynamics.com/index.php/portfolio/scaling-images/

    http://www.assuredynamics.com/index.php/portfolio/zoom-settings/

    I hope this helps.

Maybe you are looking for

  • Safari crashing my screen (and nothing else)

    I have Safari version 9.1 and it seems almost random, everything crashes. I noticed that the clock stops (I displaying the seconds), and any other Visual stops. However, I can always use the slider, and if there was no noise, it continues to play. In

  • HP Pavilion dv6000: HP laptop can't find network driver

    I tried to locate the network adapter driver correct (the wired, not wireless network, which works very well) to Windows 7 for this laptop. I tried the drivers from nVidia (several of the legacy/nForce drivers) but in Device Manager it still says "th

  • The STATE of the POWER of DRIVER FAILURE by closing

    PILOT FAILURE of STATE, its says that is why my stop takes too long, it just happened after my upgrade to win 8.0 to 8.1. Help, thank you

  • WebWorks for Smartphone V2.1.1 SDK install error - Version Java associate?

    Hello I get an error when I try to install the v2.1.1 BlackBerry WebWorks SDK for smartphone. The error prevents me to install anything. My system: Windows 7 Professional 64 bit Installation process Download and install Java SE v 1 6 of java.sun.com

  • requested operation requires elevetion

    Hello I signed up as a user administrator, I am trying to install something and it wouldn't let me install it for some reason I get this message "requested operation requires a rise" I have windows 7. Help, please. Thank you