Display BLOB to PDF in a region
Hello,
I have this function :
getblobfile(APEX_WEB_SERVICE.PARSE_RESPONSE_CLOB('RESPONSE','//runReportReturn/reportBytes','xmlns="http://xmlns.oracle.com/oxp/service/PublicReportService"')
that return a CLOB converted to a BLOB. The BLOB contains a PDF.
I would like to display this PDF in a region (in Apex page). How can I do ?
Thanks.
Take a look at this link, it should help:
Re: Displaying a pdf stored as a blob
Sam
Similar Messages
-
Display BLOB File (pdf format) from database inside Oracle Form (6i)
hi all.
Apologies for a primitive question owing to the fact that i m new to development. I have a requirement to display a pdf document with in an oracle form. i want to know is there any such control for that? or any hint how to go about it?
thanks in advanceHere I have found my jsp script...
How I get the PDF?
I call my script from pl/sql with
web.show_document('http://my_server/getblob.jsp?id=' || id_from_my_blob_table || '&baza=myhost:1521:sid','_blank');
<%@ page contentType="text/html;charset=windows-1250"%>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.text.*" %>
<%@ page import="oracle.jdbc.driver.OracleDriver" %>
<%@ page import="oracle.jdbc.driver.OracleResultSet" %>
<%
Connection con = null;
Statement stmt = null;
ResultSet rs= null;
oracle.sql.CLOB clob = null;
oracle.sql.BLOB blob = null;
String datoteka = "";
String host = "http://" + request.getHeader("host") + "/";
%>
<!--Peter Valencic 2003 -->
<html>
<head>
<title></title>
</head>
<%
String tip ="";
String id ="";
String baza ="";
String shema ="";
try
id = request.getParameter("id");
baza = request.getParameter("baza");
shema = request.getParameter("shema");
if (request.getParameter("id")== null)
throw new Exception("id= null");
else if(request.getParameter("id").equals(""))
throw new Exception("id= null");
if (request.getParameter("baza")== null)
throw new Exception("baza= null");
else if(request.getParameter("baza").equals(""))
throw new Exception("baza= null");
if (request.getParameter("shema") == null)
shema ="";
else if (request.getParameter("shema").equalsIgnoreCase(""))
shema="";
else
shema =shema + ".";
catch(Exception e)
out.println("Priąlo je do napake: " + e.toString());
return;
try
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:@"+baza,"your_user","your_password");
stmt =con.createStatement();
rs = stmt.executeQuery ("Select * from "+shema+"DOK_VSEBINA_DOKUMENTA_BLOB where ID="+id);
boolean podatkib = rs.next();
if (!podatkib)
out.print("<li>Ni podatkov za ID="+id);
return;
blob = ((oracle.jdbc.OracleResultSet)rs).getBLOB("VSEBINA");
datoteka = rs.getString("NAZIV_DATOTEKE").toUpperCase();
File blobFile = new File(application.getRealPath("/uploads/blob")+"/"+datoteka);
blobFile.createNewFile();
InputStream podatki = blob.getBinaryStream();
FileOutputStream strBlob= new FileOutputStream(blobFile);
int size = blob.getBufferSize();
byte[] buffer = new byte[size];
int length = -1;
while ((length = podatki.read(buffer)) != -1)
strBlob.write(buffer,0,length);
podatki.close();
strBlob.close();
con.close();
out.print("<li>"+host+"in2/uploads/blob/"+datoteka);
response.sendRedirect(host+"in2/uploads/blob/"+datoteka);
//odpremo z jsp-stranjo datoteko..
//response.sendRedirect("");
catch(Exception blobException)
out.print("<li>(BLOB)Napaka pri prebiranju podatkov:</li>"+blobException.toString());
return;
out.println("konec..");
%>
<body>
<form method="post">
Vnesi ID
<input type=text name="id">
<li> <input type=submit name="potrdi" >
</form>
</body>
</html>If you look my "old" script..
first it get 2 parameters baza= database (ip:port:sid), id= id from my table (PK)
at the end of my script I have:
response.sendRedirect(host+"in2/uploads/blob/"+datoteka);
this redirect will redirect you to your file stored on server side..
Because IE knows what file it must open it will open it with PDF reader...
hope this help you..
Edited by: peterv6i.blogspot.com on May 14, 2012 11:14 AM -
Display blob content as pdf file
Dear Expert,
Currently i'm using oracle apex 3.0.1.
I'm having a problem on displaying blob content (from database table) as pdf file on oracle application express but i'm able to save to download the pdf.
Below is the procedure that i used to display blob content,
PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
l_mime VARCHAR2 (255);
l_length NUMBER;
l_file_name VARCHAR2 (2000);
lob_loc BLOB;
BEGIN
begin
selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
into lob_loc,l_length
from ord_img
where oi_tno= pv_image
and oi_ti='PDF'
and oi_idx=pv_index;
exception
when others then
null;
end;
OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
HTP.p ('Content-length: ' || l_length);
OWA_UTIL.http_header_close;
WPG_DOCLOAD.download_file (lob_loc);
END lf_html_pdf;
I get the error message as below when i execute the procedure above;
Error report:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 356
ORA-06512: at "SYS.OWA_UTIL", line 415
ORA-06512: at "HCLABPRO.PKG_PDF", line 220
ORA-06512: at line 2
*06502. 00000 - "PL/SQL: numeric or value error%s"*
I'm appreciated if expert can have me on the problem above?
Thanks
From junior*Always post code wrapped in <a href=http://wikis.sun.com/display/Forums/Forums+FAQ#ForumsFAQ-Arethereanyusefulformattingoptionsnotshownonthesidebar?"><tt>\...\</tt> tags</a>:*
PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
l_mime VARCHAR2 (255);
l_length NUMBER;
l_file_name VARCHAR2 (2000);
lob_loc BLOB;
BEGIN
begin
selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
into lob_loc,l_length
from ord_img
where oi_tno= pv_image
and oi_ti='PDF'
and oi_idx=pv_index;
exception
when others then
null;
end;
OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
HTP.p ('Content-length: ' || l_length);
OWA_UTIL.http_header_close;
WPG_DOCLOAD.download_file (lob_loc);
END lf_html_pdf; Start by getting rid of:
exception
when others then
null;and never using it anywhere ever again.
If you're not actually going to use the <tt>l_mime</tt> and <tt>l_file_name</tt> variables then remove these as well. (Although I really think you should set a filename.)
>
Error report:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 356
ORA-06512: at "SYS.OWA_UTIL", line 415
ORA-06512: at "HCLABPRO.PKG_PDF", line 220
ORA-06512: at line 2
06502. 00000 - "PL/SQL: numeric or value error%s"
>
The error stack indicates that the exception is being raised in <tt>HCLABPRO.PKG_PDF</tt>: what is <tt>HCLABPRO.PKG_PDF</tt>? Does this actually have anything to do with the procedure above?
I get the error message as below when i execute the procedure above;How do you execute it?
What happens when it's executed without the <tt>when others...</tt> built-in bug? -
Displaying BLOB of type word doc in XML Publisher pdf output
Hi all,
Please guide me relating the Displaying BLOB of type word doc in XML Publisher pdf output with links or pointers.In the following xml column TRADE_LICENSE_COPY is BLOB when queried from toad and if clicked on the ouput word doc is being opened directly.How to show the column value word doc as attachment in pdf output?
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by Oracle Reports version 10.1.2.3.0 -->
<XXTDIC_SUP_REG>
<LIST_G_BASIC_QUSNRY>
<G_BASIC_QUSNRY>
<RESPONSE_ID>194</RESPONSE_ID>
<UAE_REGISTRATION>Yes</UAE_REGISTRATION>
<TRADE_LICENSE_COPY>PK</TRADE_LICENSE_COPY>
<WEBSITE_DETAILS>com</WEBSITE_DETAILS>
<AMERICA_2009_2010>Between 81 and 90 %</AMERICA_2009_2010>
</G_BASIC_QUSNRY>
</LIST_G_BASIC_QUSNRY>
<LIST_G_CONTACTS>
<G_CONTACTS>
<CONTACT_PERSON>MR.NTF1 NTL1</CONTACT_PERSON>
<PHONE_NUMBER>0</PHONE_NUMBER>
<EMAIL_ID>na</EMAIL_ID>
<FAX_NUMBER>0</FAX_NUMBER>
</G_CONTACTS>
<G_CONTACTS>
<CONTACT_PERSON>MR.NTF1 NTL1</CONTACT_PERSON>
<PHONE_NUMBER>0</PHONE_NUMBER>
<EMAIL_ID>na</EMAIL_ID>
<FAX_NUMBER>-</FAX_NUMBER>
</G_CONTACTS>
</LIST_G_CONTACTS>
<LIST_G_SC_QUSNRY>
<G_SC_QUSNRY>
<RESPONSE_ID1>113</RESPONSE_ID1>
<FY3_PROJTYPE_COMMERCIAL>Between 21 and 30 %</FY3_PROJTYPE_COMMERCIAL>
<ENG_INSTALL_CAPABILITY></ENG_INSTALL_CAPABILITY>
<SCM_EXPERIENCE_PARTNERING>Have you had experience of "Partnering"?(i.e with major contracts / employers If so list them.Also please provide details</SCM_EXPERIENCE_PARTNERING>
</G_SC_QUSNRY>
</LIST_G_SC_QUSNRY>
<LIST_G_ADDRESS>
<G_ADDRESS>
<OFFICE_ADDRESS>Addres1</OFFICE_ADDRESS>
<ADDRESS_LINE1>Addre line1</ADDRESS_LINE1>
<ADDRESS_LINE2>Addre line2</ADDRESS_LINE2>
<ADDRESS_LINE3>Addre line3</ADDRESS_LINE3>
<CITY>City1</CITY>
<STATE>State1</STATE>
<COUNTRY>US</COUNTRY>
</G_ADDRESS>
<G_ADDRESS>
<OFFICE_ADDRESS>Addres2</OFFICE_ADDRESS>
<ADDRESS_LINE1>Addre line1</ADDRESS_LINE1>
<ADDRESS_LINE2>Addre line2</ADDRESS_LINE2>
<ADDRESS_LINE3>Addre line3</ADDRESS_LINE3>
<CITY>City2</CITY>
<STATE>State2</STATE>
<COUNTRY>IN</COUNTRY>
</G_ADDRESS>
</LIST_G_ADDRESS>
<LIST_G_DSN_QUSNRY>
</LIST_G_DSN_QUSNRY>
<LIST_G_PROD_SUB_CODE>
<G_PROD_SUB_CODE>
<PROD_SUB_CODE>060.42</PROD_SUB_CODE>
<PROD_SUB_DESC>Automotive Maintenance Items and Repair/Replacement Parts.Filters: Air, Fuel, Oil, Power Steering, Transmission and Water, and PCV Valves</PROD_SUB_DESC>
</G_PROD_SUB_CODE>
<G_PROD_SUB_CODE>
<PROD_SUB_CODE>060.60</PROD_SUB_CODE>
<PROD_SUB_DESC>Automotive Maintenance Items and Repair/Replacement Parts.Hose and Hose Fittings: Brake, Heater, Radiator, Vacuum, Washer, Wiper, etc.</PROD_SUB_DESC>
</G_PROD_SUB_CODE>
<G_PROD_SUB_CODE>
<PROD_SUB_CODE>207.37</PROD_SUB_CODE>
<PROD_SUB_DESC>Computer Accessories and Supplies.CRT Holders, Cases, Glare Screens, Locks, etc.</PROD_SUB_DESC>
</G_PROD_SUB_CODE>
<G_PROD_SUB_CODE>
<PROD_SUB_CODE>207.60</PROD_SUB_CODE>
<PROD_SUB_DESC>Computer Accessories and Supplies.Keyboard Dust Covers, Key Top Covers, Keyboard Drawers, Wrist Supports, etc.</PROD_SUB_DESC>
</G_PROD_SUB_CODE>
</LIST_G_PROD_SUB_CODE>
<LIST_G_CONT_QUSNRY>
</LIST_G_CONT_QUSNRY>
<LIST_G_BUSS_CLASS>
<G_BUSS_CLASS>
<BUSS_CLASS>SUPPLY_CHAIN</BUSS_CLASS>
</G_BUSS_CLASS>
</LIST_G_BUSS_CLASS>
<CF_SUPPLIER_NAME>N1</CF_SUPPLIER_NAME>
<CF_REG_STATUS>Draft</CF_REG_STATUS>
<CF_BUS_CLASS></CF_BUS_CLASS>
<CF_PROD_SUBCODE>060.36</CF_PROD_SUBCODE>
<CF_PROD_SUBCODE_MEAN>Automotive Maintenance Items and Repair/Replacement Parts.Electrical Accessories: Alternators, Ammeters, Coils, Distributors, Generators, Regulators, Starters, etc.</CF_PROD_SUBCODE_MEAN>
<CF_COUNTRY>India</CF_COUNTRY>
</XXTDIC_SUP_REG>
Thanks in advance.
Best Regards,
MahiMahi,
you can't do that yet. -
I am trying to display BLOBS in HTMLDB using Report. I am not able to display images, PDF or Docs.
I am using the following procedure DISPLAY_IMAGE
create or replace procedure "DISPLAY_IMAGE"
(p_image_id IN NUMBER)
is
l_mime varchar2(255);
l_length number;
l_file_name varchar2(2000);
lob_loc BLOB;
begin
select mime_type,image_data, file_name, dbms_lob.getlength(image_data)
into l_mime, lob_loc, l_file_name, l_length
from image_table where image_id = p_image_id;
owa_util.mime_header(nvl(l_mime,'application/octet'), FALSE );
htp.p('Content-length: ' || l_length);
htp.p('Content-Disposition: filename="' || l_file_name || '"');
owa_util.http_header_close;
wpg_docload.download_file( Lob_loc );
end;
I tried building with the following region source in the Report
select
'<iframe src="#OWNER#.display_image?p_image_id=&i.image_id." width=300> </iframe>' img, image_id, file_name, mime_type from image_table i
Any ideas???Does accessing #OWNER#.display_image?p_image_id=&i.image_id. directly via your browser work if you replace &image_id. and #OWNER# with valid values (i.e. is a popup window displayed asking you to save or open the file)? If this works then...
The HTTP header output by the following line tells a browser to popup the "Save to disk" dialog.
htp.p('Content-Disposition: filename="' || l_file_name || '"');
If you are wanting to just display the content of the file (e.g. image, pdf etc.) in the browser you will want to remove that line.
[ BTW, I am not sure if you can set the src attribute of the IFRAME tag to be an image. PDFs should work though I think ] -
Help with inline display of a PDF
Two problems I am having with the inline display of a PDF (not a link, not a separate window).
First - the PDF has hyperlinks in it. If you spawn a separate window, the hyperlinks are active (clicking on the hyperlink will take you somewhere). If I use the APEX_UTIL.GET_BLOB_FILE_SRC within an object window, the PDF will display fine except when you hover over a hyperlink, you get the "hand" icon, and you can't click on the item. Is there a way to display the PDF within the same HTML region as the rest of the page but get the PDF to translate the hyperlinks into active links?? I am not sure if I should open this as a bug with Oracle or not.
Second, I tried to duplicate the problem on apex.oracle.com.
Everything works except when I try to display the PDF, all I get is a grey box instead of the PDF. Having done this multiple times before, it is a simple solution but I can't remember what it is...
Any help I could get would be great.
Thank you
--rolf petersen
The workspace on APEX.ORACLE.COM is:
TESTTABFORMS
UserID: TEST_USER
PW: PDF_TEST
check out application:
TEST_PDF_LINK
ID: 42403
P.S. Just got back from APEXPosed 2013 - I loved the conference.I'm not positive but it seems the APEX_UTIL.GET_BLOB_FILE_SRC doesn't work when it references a file browse item on a page where the key is on the rowid. I've copied the page to page 4 and changed it to use the bulletin_id. I've linked the bulletin id on the report to page 4
-
Problem with displaying BLOB images on JSP page using a servlet
hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
here is one of my image servlet's working versions (the essential part of it) :
BLOB blob=null;
rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
while (rset.next())
blob=((OracleResultSet)rset).getBLOB(2);
response.reset();
response.setContentType("image/jpeg");
response.addHeader("Content-Disposition","filename=42.jpeg");
ServletOutputStream ostr=response.getOutputStream();
InputStream istr=blob.getBinaryStream(1L);
int size=blob.getBufferSize();
int len=-1;
byte[] buff = new byte[size];
while ((len=istr.read( buff ))!=-1 ) {
ostr.write(buff,0,len);
response.flushBuffer();
ostr.close(); and my JSP page code :
<img src="/ImageServlet" border="0" > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
here's the magic tag : <img src="ImageJSP.jsp" border="0" > enjoy : ) -
Conditional display in a SQL-Report/Report Region
Hi,
here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
First you have to put the following javascript code in the Page HTML-Header:
<script type="text/javascript">
<!--
// SOURCE
// W:\oracle\PRJ DWLS\javascript.07.js
// Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
// Help (Substitution Strings):
// http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
// HTML Expression:
// <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
function ex_conditional_td
( p_id
, p_rownum
, p_cellnum
var l_td;
l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
// hier die Bedingung definieren
if (true) {
l_td.style.color = '#808080';
} // -- eof ex_conditional_td -- //
// Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
// HTML Expression:
// <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
function ex_conditional_tr
( p_id
, p_rownum
var l_tr; // TABLE.TR
var l_td; // TABLE.TR.TD
if (true) {
l_tr = vd_getRow(p_id, p_rownum);
l_tr.onmouseover = null;
l_tr.onmouseout = null;
for (var i=0; i<l_tr.cells.length; i++) {
l_td = l_tr.cells;
l_td.style.backgroundColor = '#DDDDDD';
} // -- eof ex_conditional_tr() -- //
var g_DEBUG = false;
var g_TBODY = null;
// Liefert das Body-Element der Tabelle mit der ID <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// Return
// das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getBody
( p_id
if (g_TBODY == null) {
var l_table = null;
l_table = document.getElementById( p_id );
if (l_table == null) {
l_table = document.getElementByName( p_id );
if (l_table != null) {
if (vd_debug()) {
alert("Tabelle gefunden, " + l_table.nodeName);
g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
return g_TBODY;
} // -- eof vd_getBody() -- //
// Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// Return
// die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getRow
( p_id
, p_rownum
var l_body = vd_getBody(p_id);
if ( l_body != null
&& l_body.nodeName == 'TBODY'
&& l_body.children[p_rownum].nodeName == 'TR') {
return l_body.children[p_rownum];
else {
return null;
} // -- eof vd_getRow() -- //
// Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
// Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// p_column - der Index der Spalte / Zelle
// Return
// die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
function vd_getColumn
( p_id
, p_rownum
, p_column
var l_tr = vd_getRow(p_id, p_rownum);
if ( l_tr != null
&& l_tr.nodeName == 'TR'
&& l_tr.children.length >= p_column
&& l_tr.children[p_column].nodeName == 'TD') {
return l_tr.children[p_column];
else {
return null;
} // -- eof vd_getColumn() -- //
// Rekursives Suchen nach einem Node.
// Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
// SQL-Report.
// Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
// darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
// Klasse <p_class> befindet.
// Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
// "t10data" formatiert.
// Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
// Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
// selbst ermittelt werden.
// Der Beispielaufruf:
// var l_body;
// var l_node = document.getElementById( 'R112233' );
// l_body = search( l_node, 'TD', 't10data', 'TBODY');
// durchsucht also das mit der Id "R112233" versehene Element [der Report, für
// den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
// die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
// definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
// Parameter
// p_node - das Ausgangselement
// p_searchIn - der Knotenname, der durchsucht werden soll
// [node.nodeName == p_searchIn]
// p_class - der Name der CSS Klasse
// [node.classList[<index>] == p_class
// p_parentName - der Name [node.parentNode.nodeName == p_parentName]
// des Elements, das zurückgeliefert werden soll. Wird als
// p_parentName der Suchname p_searchIn angegeben, wird
// das Element selbst zurückgegeben.
// Return
// das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
function vd_search
( p_node
, p_searchIn
, p_class
, p_parentName
var LN = "vd_search";
var l_element = null;
// DEBUG
if (vd_debug()) {
alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
// 1) der aktuelle Knoten ist der, der durchsucht werden soll
if (p_node.nodeName == p_searchIn) {
if (p_node.classList.length > 0) {
for(var c=0; c<p_node.classList.length; c++) {
if (p_node.classList[c] == p_class) {
// Parent Node dynmisch suchen
l_node = p_node;
if (l_node.nodeName == p_parentName) {
return l_node;
while(l_node != null && l_node.parentNode != null) {
if (l_node.parentNode.nodeName == p_parentName) {
return l_node.parentNode;
else {
l_node = l_node.parentNode;
// 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
// weitersuchen
if (p_node.children.length > 0) {
var i = 0;
while (i<p_node.children.length && l_element==null) {
l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
i++;
return l_element;
} // -- eof vd_search() -- //
// Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
// Return
// true - debug ist eingeschaltet
// false - debug ist ausgeschaltet
function vd_debug()
return g_DEBUG;
-->
</script>
Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
Second is, that you set an static id for your report region. I prefer this structure:
R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
<script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
<script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum
c) the cellnum (here we have to subtract 1 to get the "real" cell index)
The "ex_conditional" functions are just a representation of how to get the row or cell node.
Hope this help a bit.
TomI would use a CASE statement in the select....
each CASE would be an img src tag for a different button if the button is an image.
does that make sense? I can include an example if you would like... -
WEB.SHOW_DOCUMENT sometimes doesn't display the generated PDF file
Hi all,
I'm using the following code to generated my report from Forms:<br><br>
V_REPORT_ID := FIND_REPORT_OBJECT(V_REPORT_NAME);
V_REPORT_SERVER_JOB:= RUN_REPORT_OBJECT(V_REPORT_ID,P_LIST);
V_JOB_ID := substr(V_REPORT_SERVER_JOB,length(:GLOBAL.REPORTS_SERVER)+2,length(V_REPORT_SERVER_JOB));
V_REPORT_STATUS := REPORT_OBJECT_STATUS(V_REPORT_SERVER_JOB);
LOOP
IF V_REPORT_STATUS = 'FINISHED' THEN
V_TMP_PDF := :GLOBAL.APACHE_HTML_FOLDER ||'rpt'|| V_JOB_ID ||'.pdf' ;
COPY_REPORT_OBJECT_OUTPUT(V_REPORT_SERVER_JOB, V_TMP_PDF );
WEB.SHOW_DOCUMENT(:GLOBAL.AS_HOME_URL || 'rpt'|| V_JOB_ID ||'.pdf' ,'_BLANK');
END IF;
END LOOP; <br><br>
Everything works fine except the WEB.SHOW_DOCUMENT part. In some clients, this command does what it required from it and opens a new browser window with the PDF report displayed on it. In some other clients, this command does nothing: now window dispalyed. When I refer to the Application Server, I see the PDF report successfully generated there. When I put the URL of the generated report manually in the browser address, I can see the report.
<br><br>
<b>Why the WEB.SHOW_DOCUMENT doesn't display the generated PDF report in some clients?</b>I agree with the previous 2 posters.
Also firefox and ie handle it differently. Make sure you test on what your clients use.
Sometimes acrotray.exe is completely retarded and doesn't work. -
I am programming a DVD-Rom in DVD Studio Pro 4 and need to display and open pdf files, any suggestions?
http://documentation.apple.com/en/dvdstudiopro/usermanual/index.html#chapter=22% 26section=9%26tasks=true
-
Display BLOB (image) column in (interactive) report
Hi,
I have a field called "picture" in my table "details" which is of type BLOB. i also have a field for "MIMETYPE" and "filename"
i additionally have a "name" and "description" columns which i need to display along with the picture as columns in a report (preferably interactive).
i have also modified the BLOB display format as per
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
what i am missing is the correct query. if possible, i would like to control the size of the picture rendered within the report like say 40*50.
I have also referred to the thread
APEX 3.1 Display BLOB Image
But i don't know how to place the
dbms_lob.getlength("BLOB_CONTENT") as "BLOB_CONTENT"
in my query.
The above also makes the report column as of type "number". is this expected?
Any help would be much appreciated.
Regards,
RamakrishnanYou haven't actually said what the problem is?
>
I have a field called "picture" in my table "details" which is of type BLOB. i also have a field for "MIMETYPE" and "filename"
i additionally have a "name" and "description" columns which i need to display along with the picture as columns in a report (preferably interactive).
i have also modified the BLOB display format as per
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
what i am missing is the correct query.
I have also referred to the thread
APEX 3.1 Display BLOB Image
But i don't know how to place the
dbms_lob.getlength("BLOB_CONTENT") as "BLOB_CONTENT"
>
Something like:
select
name
, description
, dbms_lob.getlength(picture) picture
from
details
if possible, i would like to control the size of the picture rendered within the report like say 40*50.For images close to this size it's easy to do this for declarative BLOB images in interactive reports using CSS. Add a style sheet with:
.apexir_WORKSHEET_DATA td[headers="PICTURE"] img {
display: block;
width: 40px;
border: 1px solid #999;
padding: 4px;
background: #f6f6f6;
}where the <tt>PICTURE</tt> value in the attribute selector is the table header ID of the image column. Setting only one dimension (in this case the width) scales the image with the correct aspect ratio. (The border, padding and background properties are just eye candy...)
However, scaling large images in the browser this way is a huge waste of bandwidth and produces poorer quality images than creating proper scaled down versions using image tools. For improved performance and image quality, and where you require image-specific scaling you can use the database ORDImage object to produce thumbnail and preview versions automatically, as described in this blog post. -
Not able to Display Barcode in PDF
Hi Gurus
I created a BIP report where in I am displaying a barcode in place of PO number. I selected 3 0f 9 barcode. I have a sample output and trying to view the preview in PDF. It is not displaying barcode in PDF format. How ever it is displaying the barcode in rtf, explorer etc. Please help me in solving this. Am I missing any setup after installing Font and BI Publisher desktop..
Thanks
AhmedHi Ahmed,
Are you able to see the bar-code in pdf output in rtf layout (not thru concurrent request submission)?
Please check the following steps and see if you have missed one of these set-ups in XML Publisher administrator:
XML Publisher Administrator-->Administration
Font File--->Give font file name and Browse the bar code (3 of 9 in your case)--->Apply
Font Mapping-->Mapping Name--->Mapping Code
Type--->FO to PDF--->Apply
Open Tab Create Font Maping
Font Family: Code39-Digits(This name should be exactly the font name which comes in word)
Style: Normal
Weight: Normal
Target Font Type: Truetype
Continue
Font : font file name
Apply
Go to Template Tab
Query for your template
Open Edit Configuration
Click on FO Processing
In Font Mapping set :associate your file
Please let me know if you are still unable to view the barcode.
Rgds,
skaundinya. -
How can I display de last items of a region from other page in Portal?
I want to display de last five items (f.e.) included in a region (with attributes created) from other page. I've tried using custom search, but it also shows the attribute names, and I want show the attribute values (I don´t know how can I format these attributes).
Thanks a lot.How can I display the last items of a region from other Oracle Portal page?
-
hi,how can i change the default settings on my adobe readerX1 such that it will display all my pdf files according to their individual cover pages (as cover picture thumbnails)before i click them to open and read........i really enjoyed this feature as a default settings upon installation in previous editions of adobe reader .i use a windows 8 pc now.thank
For sideloaded content the nook pulls the metadata from ePub file itself. I would suggest looking at a program like Sigil or Calibre that will let you edit the metadata in the book to make it appear like you want.
For the PDF vs ePub - No, that's the way PDFs work (think of them as graphics, not text), wheres ePubs are Web Pages - so no you can't them to behave exactly alike without converting the files. -
How to display a static Image in a region (Not From Database)
Hi
How can I display a company logo in a region? Not from any database.
If we can display a static company logo in a region then where Do I have to place this Company Image (Which Directory or is there any location I have to place this company logo).
Regards
Kiran AkkirajuScott
Thanks for reply.
I have gone through the link and as per the link
navigate to the Application Builder for your application.
click on the Shared Components icon
click the Images icon
click Create to upload a new image
click Browse... to locate an image on your local filesystem
make sure you remember the name of the image, for example: my_logo.gif
When I click on Application Builder I am not able to see shared Components.
I am able to see a Shared Components in a page definiton only.
Could you please let me know where Can I find this Shared components option.
Regards
Kiran Akkiraju
Maybe you are looking for
-
Portable hard drive no longer requires password to decrypt it - security risk
I have a WD passport for Mac. It was previously encrypted and i would have to enter a password every time I wanted access to the drive - perfect. But then I had to decrypt it and when I had finished I re-encrypted the drive once again by right clicki
-
Invisible Tables In Dreamweaver CS3
Hello – I'm having a problem accessing the proper table in Dreamweaver CS3. In the past I never had a problem with this now all of a sudden I cannot figure out what I did to change this setting. I want my tables without borders, which I have achieved
-
I tried putting itunes in safe mode
I put my itunes in safe mode & i still have a problem with syncing my music to my ipod classic 160GBs. I kee getting a sign saying a duplicate name & my ipod can't be synced. What can i do to solve this problem, i just want to put my music back on my
-
Mac mini cannot dect view sonic monitor with thunderbolt-to-dvi interface
Mac mini cannot dect View Sonic VX1035wm display with Thunderbolt port-to-DVI-D interface.
-
Where statement with a select statement
Hi everybody Is possible to create a sql statement in query generator like: SELECT T0.[Name] FROM [dbo].[@FAMILIA_ARTIGOS_SUB] T0 WHERE T0.[U_Familia] =SELECT $[OITM.U_Familia] Regards Vasco