Oracle reports to display PDF/Excel files stored in the Database
can we use Oracle reports to view/display PDF/Excel files stored in the Database? Thanks Lalitha
A document stored in the database can be easily retrieved in or via the browser using mod_plsql. Simplified:
select content, mime_type
into v_blob, v_mime_type
from ...
owa_util.mime_header(nvl(v_mimetype,'application/octet'),false);
htp.p('Content-length: ' || dbms_lob.getlength(v_blob));
owa_util.http_header_close;
wpg_docload.download_file(v_blob);So, the link in your report should point to this database procedure.
Edited by: InoL on Mar 1, 2011 4:17 PM
Similar Messages
-
Best ways to view/display PDF/Excel files stored in the Database
What are best ways to display/view PDF/Excel files stored in the Database? thanks L
Thanks tom, sorry let me explain. Currently we have oracle forms screen, using webutil to store/view files into DB. client won't like the interface, they want us to make it more friendly, drag and drop if possible, load multiple files, as possible.. So I am exploring different ways to improve may be java (or jdev/any any other), different screen designs, different features for fileupload/download/view options.
-
Download of files stored in the database
I am using FireFox and my users IE. Download of files stored in the database worked for me but not for my users. I recieve a choice of downloading the file or opening it with a full file name and file type. IE users have some strange behaviour - no name of the file and they can only save it to their local drive - some kind of weird microsoft security option. I was searching for it but couldn't find. Anyone here who would know where to search for it?
Denes KubicekHello Jens,
I am using the standard procedure from the manual:
CREATE OR REPLACE PROCEDURE download_my_file_pr (p_file IN NUMBER)
AS
v_mime VARCHAR2 (255);
v_length NUMBER;
v_file_name VARCHAR2 (2000);
lob_loc BLOB;
BEGIN
SELECT mime_type, blob_content, NAME, DBMS_LOB.getlength (blob_content)
INTO v_mime, lob_loc, v_file_name, v_length
FROM my_file_table
WHERE ID = p_file;
-- set up HTTP header
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
OWA_UTIL.mime_header (NVL (v_mime, 'application/octet'), FALSE);
-- set the size so the browser knows how much to download
HTP.p ('Content-length: ' || v_length);
-- the filename will be used by the browser if the users does a save as
HTP.p ('Content-Disposition: attachment; filename="' || v_file_name || '"');
-- close the headers
OWA_UTIL.http_header_close;
-- download the BLOB
wpg_docload.download_file (lob_loc);
END download_my_file_pr;
Denes Kubicek -
Would you put XML and HTML files stored in the database as files?
Hi,
Basically that is my question. My criteria is that I will be given some XML files, I need to save the XML file somewhere for future reference. However I also have to store when it was registered and so on.
Would you install this in the database? Or you would just store the path where it is deployed?
Regards,
Sim085Hi,
Basically that is my question. My criteria is that I
will be given some XML files, I need to save the XML
file somewhere for future reference. However I also
have to store when it was registered and so on. So the XML won't be changing unless the registration date is updated?
A file modification time could give you the same effect.
Would you install this in the database? Or you would
just store the path where it is deployed?I'd favor the latter for the sake of an argument.
If you put it in the database, you wouldn't be able to query for the XML except by ID or registration date. Not much point in having it there.
% -
How can i send files stored in the database as an attachment?
hello
is it possible to send files witch are stored in database as an attachment ?
how can i do that?
thanksYou need to use a Java stored procedure created within the Orcale 8i database.
This Java stored procedure should import the java mail classes.
Qurashi -
Can Discoverer have link to display documents stored outside the database?
I posted a message some time ago called "Possible for Discoverer to display BLOB type documents stored in database?" and got great answer.
Now our customers are asking if it is possible, from Discoverer, to link somehow to a file stored outside the database on the Unix file system and get their computer to display it? Can anyone tell me if this is possible please?
The only thing I've seen in the documentation that may be related is in Oracle Business Intelligence Discoverer Configuration Guide, section 10.6 List of Discoverer user preferences. It says there that Discoverer preference ProtocolList can be set so that Discoverer hyperlinks can be set to use protocols such as telnet, but the default is HTTP, HTTPS, and FTP.
THank you in advance if you can help.
Regards,
Julie.Hi Rod,
I have tried the second method: "create a Oracle directory pointing to the Unix directory containing the files". I have had success with it, but I'd be grateful if you could advise me if you would have done this the same way as described below:
I put two Word docs and two text docs called clob_test1.txt, clob_test2.txt, blob_test1.doc, blob_test2 in the Unix directory corresponding to an Oracle directory called 'EIF'. I thought an extrenal table was needed so that Discoverer would have an object to write a queruy against. So I created a file called lob_test_data.txt with the following contents:
1,01-JAN-2006,text/plain,clob_test1.txt
2,02-JAN-2006,text/plain,clob_test2.txt
3,01-JAN-2006,application/msword,blob_test1.doc
4,02-JAN-2006,application/msword,blob_test2.
THen I created an external table using the following DDL:
CREATE TABLE jum_temp_lob_tab (
file_id NUMBER(10),
date_content DATE,
mime_type VARCHAR2(100),
blob_content BLOB
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY EIF
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
BADFILE EIF:'lob_tab_%a_%p.bad'
LOGFILE EIF:'lob_tab_%a_%p.log'
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
file_id CHAR(10),
date_content CHAR(11) DATE_FORMAT DATE MASK "DD-MON-YYYY",
mime_type CHAR(100),
blob_filename CHAR(100)
COLUMN TRANSFORMS (blob_content FROM LOBFILE (blob_filename) FROM (EIF) BLOB)
LOCATION ('lob_test_data.txt')
PARALLEL 2
REJECT LIMIT UNLIMITED
then created a Discoverer End User Layer folder against this external table, and used exactly the same technique as we did for downloading the BLOB from the database table (creating a new folder item containing a URL calling a database procedure which calls the Oracle code to download the doc). THis worked, but sometimes my PC didn't seem to know that the Word docs were Word docs and it needed to launch Word. Other times it did manage to do this OK. It always displayed the two .txt files as HTML docs.
Just wondered if you'd be good enough to critique this approach.
THank you, Julie. -
Image compressed and stored in the database.
Hi,
We have a tiff file stored in the database and then compressed using the following Intermedia Oracle method.
process ('compressionFormat=FAX4,maxScale=1696 2200'); and save it back in the database.
This oracle database is 8.1.7.4. The tiff file gets processed when we use TIFF file generated by old scanner but errors out with the TIFF file generated by latest scanners.
The error I get is ORA 29400 , IMG-00704.
There is a difference in TIFF version in the outputs generated by two scanners,
The compression option : TIFF modified G3 in the old one
while the new one has Lempel-Ziv
Also, the tiff is loaded and saved fine but the image gets corrupted after the intermedia process method is run.Thank you for your reply. I am glad to find that I did not miss an option. I was aware that I could move my pictures into some other folder, but you have forgotten the solution that I chose. That was to go back and use ZoomBrowser, which works to access photos in any folder I choose. In addition it loads promptly. I have only spent a brief time using the ImageBrowser but don't recall seeing any enhancements that over ZoomBrwoser. Perhaps if I was attempting to interface with other software but as a stand-alone product, well perhaps you could enlighten me as to what makes ImageBrowser EX a better product.. Regarding the Accept as Solution: are you implying that Canon restricts their search function to only those responses that the OP marks as accepted?
-
Using XSLT stored in the database
Hi all,
I have an XML file stored in the database as a CLOB. I also have a XSLT stored in the database as a CLOB. I want to apply the XSLT to the XML but the xslprocessor.newStylesheet requires that I provide a url for the stylesheet. Is there any other way of acheiving this transformation?
Thanks
GoelUse the XMLTYPE object.
Fetch your XML and XSL into clobs and create an XMLType object of your XML using the constructor:
declare
xml_obj xmltype;
xml_clob clob;
xsl_clob clob;
begin
-- fetch the xml, xsl into your clobs
xml_obj := xmltype.createxml(xml_clob);
htp.p(xml_obj.transform(xmltype(xsl_clob)));
end;
XMLTYPE object (new in 9iR2) has a very handy API for manipulating XML. -
Oracle Reports to display in IE 5.5 browsers
Oracle reports (6i) display fine in IE 4/5.0 browsers, butr those with 5.5 display a blank screen.
hello,
there are some issues with showing PDFs produced by the reports server in IE55 that should be solved with one of the latest patches.
please check this issue with oracle support services.
regards,
the oracle reports team -
How to convert Oracle reports previewer output into delimited file.
How to convert Oracle reports previewer output into delimited file if the report has more than 1000 pages.
I tried with previewer option File --> Generate to file --> Delimited file, but the report engine is crashing.Not generating .TXT file.
I observed that this option is not working for more than 400 pages.
I am using Oracle reports 6i version.
Plz suggest me to generate .TXT file from Report previewer.You can specify a delimiter (a character or string of characters) to separate the data (boilerplate or field objects) in your report output in either of the following ways:
On the command line using the DELIMITER keyword.
In the Delimited Output dialog box or DelimitedData Output dialog box (displayed with File > Generate to File > Delimited or File > Generate to File > DelimitedData) in Reports Builder.
for further information goto this link
http://download.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_concepts2.htm#sthref760 -
Need Help: Could WEBI report directly based on EXCEL file be refreshed?
In 3.0, Could WEBI reports directly based on EXCEL file be refreshed, after exporting to BOE platform?
I've made a test on that and find out WEBI report could not be freshed in Infoview while DESKI report could.
Some colleague suggest me to build the WEBI report based on a Universe created based on the EXCEL file.
I want to confirm, is it a by-design that we could only refresh WEBI report based on universe? or I could do some setting to made the refreshment of WEBI based directly on EXCEL file works?
Please Help!! Thanks a lot~~~Hi Rachel,
You could try the Rich Client Product Guide [http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_web_intelligence_rich_client_en.pdf] but I don't think it is a problem...more like a feature by design - it makes sense.
You could try the route of creating a universe on top of excel... See posts
[DBMS Independent universe;
[how to connect to excel sheet and create a universe on top of that;
Hope this helps
Jacques -
Save Oracle Report Output as PDF format in the system folder
Hi,
Is it possible to Save Oracle Reports Output as PDF(file_name.pdf) format in the system folder(say C:\temp\file_name.pdf).
I am using Repors 10g R2.
Note : i dont want to open the report preview as PDF, just i want to save the PDF file in the a specified location.
Regards,
Suresh.VHello,
Yes, it is possible.
Execute the Reports passing the parameters :
DESFORMAT=PDF DESTYPE=FILE DESNAME=C:\temp\file_name.pdf
Regards -
Access Word and Excel files stored on 8820 SD Card?
Need to be able to access many Word and Excel files stored on an 8820 SSD card - Media Center does not have a category for "business files" only pics and video etc. Is there a way to do that like Documents to Go on the Palm systems? Roxio's filters do not allow Word and Excel files either but Mass Storage accepts the OK. How to access on the SSD card?
On Android OS 4.1 - 4.3 (Jelly Bean) or older, Adobe Reader for Android version 11.2.x has a known defect in the "All PDFs" view. The All PDFs view does not show the files and folders on an external SD card. A workaround is to use the Folder View instead of the All PDFs view. We have fixed the defect and plan to include the fix in the next release of Reader for Android.
On Android OS 4.4 (KitKat) only, neither All PDFs view nor Folder View shows any files or folders on an external SD card. Reader cannot save any changes to the files on an external SD card, either. We are still working on fixing the problems. In the meantime, please copy the files from your external SD card to your device's internal storage (e.g. /storage/emulated/0/Documents/...) using a File Manager/Browser app or use a cloud storage service (Acrobat.com, Dropbox, Google Drive, etc.) to store files.
Your case is the latter because your Samsung Galaxy S4 phone is running 4.4.2 (KitKat).
Sorry for the inconvenience. -
Problem displaying an Excel File: Please Help
Hello,
I spent 3 hours this morning reading the forum on how to display an Excel file in the browser using JSP and I apologize in advance if the answer is in the forum.
I cut and paste many examples: My goal is to display an excel file on the browser.
Below is the code but the result is a disaster (please se after the code the result).
My question is how can I display an excel file using the browser. What's wrong with my code. Apparently it worked for many people on the forum.
Please help. I must do that by tomorrow and I had spent already so many hours.
THANK YOU SO MUCH IN ADVANCE.
So far the forum had helped me a lot.
<%@ page language="java" import="java.io.*" %>
<%
String myfile = new String("/temp/temp.xls");
File fileName = new File(myfile);
// Setup our streams
FileInputStream fis = null;
ServletOutputStream out1 = response.getOutputStream();
// Set content type and other response header
response.setContentType(getServletContext().getMimeType(fileName.getName()));
//response.setContentType("application/excel-document");
//response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment; filename=\"" + fileName.getName());
response.setContentLength((int) fileName.length());
// Read in the file from the correct place and stream it to the user
int iRead;
FileInputStream stream = null;
try
stream = new FileInputStream(myfile);
while ((iRead = stream.read()) != -1)
out1.write(iRead);
out1.flush();
} catch (IOException i) {}
%>
RESULT:
������>�� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ���@����\p Yahel Malkin B�a�=���=��@�7 �������Oh��+'��0p08 P \h� Yahel Malkinn@�|�$�+�@�|�$�+�������.��+,��0�HP X`hp x ��� competitivePricingReportSave Worksheets���� ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Root Entry�������� �F��T�+�����Workbook������������SummaryInformation(����DocumentSummaryInformation8������������For those who are having the same problem than me here the solution:
In fact I was only interested in saving the file
<%@ page language="java" import="java.io.*" %>
<%
String myfile = new String("/temp/temp.csv");
response.setContentType ("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=\""+myfile+"\"");
int iRead;
// Setup our streams
FileInputStream fis = null;
ServletOutputStream out1 = response.getOutputStream();
FileInputStream stream = null;
try
stream = new FileInputStream(myfile);
while ((iRead = stream.read()) != -1) {
out1.write(iRead);
out1.flush();
} catch (IOException i) {}
%> -
How do I open a PDF file stored on the iCloud drive with my iPad?
How do I open a PDF file stored on the iCloud drive with my iPad?
This document explains how:
Opening PDF Files in Reader for iOS (iPhone and iPad)
Maybe you are looking for
-
Song is "Leaving Earth" from the Mass Effect 3 Original Soundtrack
-
Is creating a static method frowned upon in OO development? Is it only a matter of convenience by not having to instantiate? Any insight is appreciated. --Gregory quote: Don't throw away the old bucket until you know whether the new one holds water.
-
Style to change color of single column in list
Hi, I need to get below functionality in results list. need to break part of sentence to another line with different color. How to achieve this. Thanks & Regards, Siva
-
New weblogic cookie gets created - app is protected by SAM J2EE agent
All We have installed J2EE agent 2.2 on Weblogic App server (8.1 SP6) fine.. We get authenitcated against access manager while accessing a weblogic app, however it seems that we are going in a loop and a new weblogic session id is getting created eve
-
What is the difference between bar and column charts
To me they are the same. When should I use one of the two, but another?