Download the file from the link in the report
I built a custom file upload/download capability that works very well. The UPLOADED_FILES table has 2 columns that are used to access the contents of the file - a sequence number of a related table entry and a varchar2 file type. I have a built procedure that downloads the contents of my table UPLOADED_FILES. Now, I would like to be able to display a link in my report which allows the user to download the appropriate file. I can't get the right format. I need to pass 2 variables to the procedure - a (p_file) is a column name in the report, while the other (v_type) is a static string value "SUMMARY."My procedure is:
create or replace PROCEDURE download_my_file
(p_file in number,
v_type in varchar2)
AS
v_mime VARCHAR2(48);
v_length NUMBER;
v_file_name VARCHAR2(2000);
Lob_loc BLOB;
BEGIN
SELECT UPLOAD_MIME_TYPE, upload_CONTENT, UPLOAD_NAME, DBMS_LOB.GETLENGTH(upload_content)
INTO v_mime,lob_loc,v_file_name,v_length
FROM uploaded_files
WHERE NOTIFICATION_SEQ_ID = p_file and
upload_type = v_type;
owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
htp.p('Content-length: ' || v_length);
htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
owa_util.http_header_close;
wpg_docload.download_file( Lob_loc );
end download_my_file;
I triedjavascript:popupURL("DOWNLOAD_MY_FILE?p_file=#NOTIFICATION_SEQ_ID#&v_type='SUMMARY'");
and I tried<a href="#OWNER#.DOWNLOAD_MY_FILE?p_file=#NOTIFICATION_SEQ_ID#, v_type='SUMMARY' ">Download Summary</a>
in the URL of the link in the column to the report item. Neither work. Can someone help me fix this please?
Hello
Sorry, it is just spotted 'in the URL field. You should put in the Expression of HTML and remove all the settings link. The & works ok in there.
Andy
Tags: Database
Similar Questions
-
Loading of the Internet
Whenever I try to download a file from the internet it get the same message everytime "he could not open the Internet Explorer Web site. The site requested is either not available or cannot be found. "Please try again later ' this happens for all sites, I try to download from... Please help.Hello
To work around this problem, follow these steps:
1. start Internet Explorer.
2. on the view menu, click Internet Options.
3. on the Advanced tab, clear the do not save encrypted pages on the
disk check box.
4. go to the page where you received the error.
5. right click on the file link, click on save target under, select one
destination and then click Save.
Good luck! -
Download large files from the internet
I can't download large files from the internet in Windows 7 to SBS 2003 domain. What is the solution?
Hello
Thanks for giving an opportunity to help you with your concern for Windows to Microsoft Community!The question you have posted is better suited for the TechNet forums. I suggest you to report the issue in the following link for assistance:
http://social.technet.Microsoft.com/forums/en/smallbusinessserver/threads
I hope that helps!
If you need help on Windows please keep us informed.
We will be happy to help you! -
When I use the socks proxy in firefox, I can only navigate through internet and cannot download any file from the internet.
I have no problem when using HTTP proxy servers and have no problem managing which connection to internet without proxy.
I found this problem due to the integration of the browser evolved in the idm software, and when I turn this option off in idm problem will be solved
-
My laptop does not start at the top. It indicates that the following file is missing or damaged WINDOWS\SYSTEM32\CONFIG\SYSTEM.
Download this file from the Microsoft Web site. I put the XP CD in and it starts downloading files but it asks what windows installation I want to and don't gives me one option other than press "Enter" to abandon.
See if anything here helps-
How to recover a corrupted registry that prevents Windows XP startup
http://support.Microsoft.com/kb/307545Install and use the Recovery Console in Windows XP
http://support.Microsoft.com/kb/307654See also
How to Troubleshoot Registry Corruption issues
http://support.Microsoft.com/kb/822705How to fix a missing or corrupt Windows\System32\Config\System file
http://xphelpandsupport.MVPs.org/how_do_i_repair_a_missing_or_cor1.htmTaurArian [MVP] 2005-2010 - Update Services
-
I'm trying to download a file from the active section of the creative cloud, but it is not letting me. It is saying I need a simple or full membership, which I do. I have the plan composition of the photographer. I made sure I'm connected, but it is still trying to put me on a plan, which I have. Help please!
Hashim, see the FAQ section on: CC help | Creative market Cloud
-
Please help, I downloaded 3 files from Adobe for CS3, but one of the .exe files cannot be due to due to a (file archive part missing, all parties must be in the same folder message)
Hi Francis,.
Make sure you download both files from there. https://helpx.Adobe.com/Creative-Suite/KB/CS3-product-downloads.html
Compare the size of the file and you will have to perhaps disable all anitvirus during download and install it.
Thank you
Scott
-
How can I overcome the Abobe Reader message whenever I try to download a file from a web site: Adobe Reader outdated! Subsequently, I am unable to download and print the file
You do not give us the exact words, but I guess that this message appears on the screen, like on a regular PDF with this message. If so, ignore the message and save the file in the usual way on your desktop. Now open in Adobe Reader.
-
After downloading my file from the word document is mostly gibberish. Why? The service used "exportPDF.
Hi shelbyrn,
The quality of conversion is really depends on the quality of the original PDF file. Please see Will Adobe ExportPDF convert text and shape... | Adobe Community. Do you know what who or how the PDF was created?
You can have better luck by disabling OCR as described in this paper: How to disable the optical character recognition (O... |) Adobe Community. (Note, however, this is option is is not optimal if the PDF file is created from a scanned document, you wish to OCR enabled to convert the text from the image in the PDF file to editable text).
Best,
Sara
-
Problems with downloading the reports BI to Excel in Office 2007
Hello
I created reports using the plugin BI Publisher for Word 2007 and deployed through the Apex. Users with Office 2003 is installed get download the file without any compatibility issues. These users on Office 2007 get a warning as follows:
'The file you are trying to open.' filename.xls, is in a different format than specified by the file extension. Check that the file is not corrupted and precedes from a trusted source before you open the file. Do you want to open it now? "
The file will open and save, it's all just annoying to get this message every time. There are no problems when downloading the report to other formats.It is a known problem... It is a "Fix" of Microsoft, to ensure that people know that the file is NOT a style true Blue XLS file... My office just to go through it and it is adjustable, but involves a registry setting that they do NOT HAVE want to impliment...
Please see the attached url:
http://Stephen.paytonplace.us/archives/74
Thank you
Tony Miller
Webster, TX -
Apex can we download the reports in .txt format?
can we download the reports in Apex .txt format? because only word, excel, html, xml is given as an option, but I want in text format...Hello
Excel is csv you can read with a text editor. No you want?
In an interactive report you can not give an extension with it (happens automatically), but in a normal report, you can call ex .txt which will cause a text editor open the file automatically.Kind regards
Dimitri
----------------------------------
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/
http://www.apexblogs.info/ -
Hello
I am facing a problem and do not know how to solve this problem.
Creating reports and during the test, we found that when transfer us data in Excel, the formatting of the data is lost.
For example if we have cost center "010", then the data in excel will show 10 instead of 010.
Please let me know is there possinble to solve this problem.
Any help is greatly appreciated.
Thank you
PoojakHello..
This bug is known.
Work is about: Add after code fx and make your data like format: HTML.
'
' || 'YourColumn'Make sure that your column is varchar, if it is not converted to varchar type.
Disadvantage of this approach is: no problem as long as you download in excel. But if you download the report in pdf format, all code will be appear as a value.
-
iI has downloaded a file from eopenbox when I tried to open it I tells me safari cannot open the file because there are no applications available, how do I do this.
Rob
What is the file extension?
-
Unable to download a file from microsoft, I need file msxml.msi Service pack 2 for Windows XP to download the McAfee antivirus software
I just downloaded MSXML 4.0 Service Pack 2 (Microsoft XML Core Services) from here:
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=3144b72b-b4f2-46DA-B4B6-c5d7485f2b42
You say that you can not download, but do not say what is happening when you try to download and my crystal ball is on vacation this week. Stupid ball...
-
Download a file from a local data store
Hi all
I was wondering if it is possible to generate scripts downloading a file from a local data store on a Windows Server? Also, there are scripts available to perform such a task?
Thank you
Hello
Just guessed myself using the cmdlet copy-datastoreitem - good KB article here
After the connection to your vCenter server, connect to the data store and mount the source as a PSdrive data store, and then use the cmdlet. It also works well download a data store and the downloading of a data store: just spent around objects in - point and - Destination.
At first glance, it seems that you need to know the source path of the data store.
$dstore = get-datastore "YourDatastoreName" New-PSDrive -location $dstore -name dStore -psprovider vimdatastore -root '\' copy-datastoreitem -item dStore:\VMFolder\VMConfig.vmx -Destination c:\SomeFolder\vmconfig.vmx
-
Downloading files has become a problem for me. Internet most of the files for example software download from Blackberry.com.
When I go to download the file, the name is changed and the .exe extension is changed.
Just change the extension of .exe file (.node1) and it will work. has worked for me...
Maybe you are looking for
-
a Web site asks me to install something, I'm not sure that it is legitimate
Hi, all. on a tourist site, I clicked on the link for a list of shopping places. I get a notice that says: "you must install this thing to get this link to work." It has a logo of firefox, but I'm still nervous, having obtained Burns very badly once
-
FireFox has lost all bookmarks after failure
Yesterday my house had a power outage and when the power is back I open FireFox and find that all my favorites have disappeared. When I go to a site that I have bookmarked in the past, he says this bookmark buy this is not in the list of bookmarks un
-
Trying to install XP on an SSd and a receiver error code is 7.
try to install - file \i386\c_437.nls could not be loaded. The error code is 7 After the failure of the content from my old drive hard (including my copy of Windows XP), I'm trying to install XP on my new drive hard solid state using the reinstallat
-
How to perform a recovery without diisc
-
loose connection of the unit updated wishes
Hi all I am currently using CUC9.1.2 and reg with 270 users. And now we plan to update their wishes to company standard greeting for everyone. is there anyway I can block admin to do instead of config it one by one. Thank you very much Simon