Image encoding in XML report definition

For a number of reports I have the Report definition in XML-format. These files contain embedded images.
How do I extract image-files from the xml's. It doesn't look like the strings for the images are not base16 or base64 encoded?

Are you working with something like this?
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<report name="MODULE1" DTDVersion="9.0.2.0.10">
  <xmlSettings xmlTag="MODULE1" xmlPrologType="text">
  <![CDATA[<?xml version="1.0" encoding="&Encoding"?>]]>
  </xmlSettings>
  <data>
    <systemParameter name="MODE" initialValue="Default"/>
    <systemParameter name="ORIENTATION" initialValue="Default"/>
  </data>
  <layout>
  <section name="main">
    <body>
      <image name="B_1">
        <geometryInfo x="0.00000" y="0.00000" width="8.31250" height="6.25000"
        />
        <visualSettings fillPattern="transparent" fillBackgroundColor="black"
         linePattern="transparent" lineBackgroundColor="black"/>
        <points>
          <point x="0.00000" y="0.00000"/>
          <point x="8.31250" y="6.25000"/>
          <point x="0.00000" y="0.00000"/>
          <point x="8.31250" y="6.25000"/>
        </points>
        <binaryData encoding="hexidecimal" dataId="image.B_1">
FF8DFF0E 0001A464 94640010 10100006 00060000 FFBD0048 0001B0C0 E0C0A001
E0D0E021 11013181 82A18161 61811332 52D182A3 33D3C393 33837304 84C5E404
44755473 8305D615 75F52676 8676E3D4 17970746 87C55676 36101121 21815181
F2A1A1F2 36248324 36363636 36363636 36363636 36363636 36363636 36363636
36363636 36363636 36363636 36363636 36363636 36363636 3636FF4C 102A0000
D29681A8 4EB94557 F3D8D588 912F1FCE A2478278 4E157FE8 D3B2F257 A1906D14
A809D102 9F646EFF 007CA66A B08C98EF 2E5344BB 4978EEAD 55093F75 6A4E8D29
345ECCA0 4F537A2C 9CB424CB 8DDE0D7D 53D4D002 D3E32E6D 1942F70F 5D29740C
7CF15A56 1A469E72 F449A09D 918DE7CF 5F9F877A 17106FEF 474C484E 6F41C067
0D1338AF 1D06311A 4E6608F0 F4C40540 859FBFE7 579924E1 495C31FF 9D
        </binaryData>
      </image>
    </body>
  </section>
  </layout>
  <webSource>
  <![CDATA[<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
<%@ page language="java" import="java.io.*" errorPage="/rwerror.jsp" session="false" %>
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<!--
<rw:report id="report">
<rw:objects id="objects">
</rw:objects>
-->
<html>
<head>
<meta name="GENERATOR" content="Oracle 9i Reports Developer"/>
<title> Your Title </title>
<rw:style id="yourStyle">
   <!-- Report Wizard inserts style link clause here -->
</rw:style>
</head>
<body>
<rw:dataArea id="yourDataArea">
   <!-- Report Wizard inserts the default jsp here -->
</rw:dataArea>
</body>
</html>
<!--
</rw:report>
-->
]]>
  </webSource>
  <reportPrivate versionFlags2="0" templateName="rwbeige"/>
  <reportWebSettings>
  <![CDATA[]]>
  </reportWebSettings>
</report>Image data is encoded in hexadecimal format (base16) but the hex digits are reversed compared to the original byte sequence.
For example, the first eight bytes in the source are :
FFD8FFE0 00104A46but appears as FF8DFF0E 0001A464 in the XML file.
You'll need a small program to read the file, extract the hex binary stream, process it and write back the data to a file.
Example in PL/SQL (tested on db version 11.2.0.2) :
DECLARE
fid     utl_file.file_type;
len     PLS_INTEGER := 1024;
buf     RAW(512);
module_name VARCHAR2(260) := 'MODULE1';
dir_name    VARCHAR2(30) := 'TEST_DIR';
BEGIN
  for r in (
    /* extract all image elements */
    select img_name
         , regexp_replace(img_data, '\s+') as img_data
    from xmltable('//body/image'
          passing xmltype(bfilename(dir_name, module_name||'.xml'), nls_charset_id('WE8MSWIN1252'))
          columns img_name varchar2(30) path '@name'
                , img_data clob         path 'binaryData'
  loop
    /* output file */
    fid := utl_file.fopen(dir_name, module_name || '_' || r.img_name || '.jpg', 'wb', 32767);
    for i in 0..trunc((dbms_lob.getlength(r.img_data) - 1 )/len)
    loop
      /* read 1k of hex data and convert to binary */
      buf := hextoraw(
               regexp_replace(
                 dbms_lob.substr(r.img_data, len, i*len + 1)
               , '\2\1'
      utl_file.put_raw(fid, buf);
    end loop;
    utl_file.fclose(fid);
  end loop;
END;
/

Similar Messages

  • How add new field in layout in RDF using XML report definition

    Hi, ALL
    Do you know how add new field in layout of existing report in RDF using XML report definition. If I try change anything in RDF layout, layout which defined in XML override report layout.

    hello,
    in reports 6i we have this limitation, that you can not add a field to a report unless you re-default the whole report, as we do not support positioning-information in the customization file.
    regards,
    the oracle reports team

  • REP-6104: Invalid XML report definition

    Hello All,
    We're encountering the above error. What could be the cause of the problem?
    We're using Oracle 10g 10.1.2 on AIX as our report server.
    Any help would be greatly appreciated. Thanks!
    [2006/8/6 1:17:56:737] (C Engine) ----------------------------------------
    [2006/8/6 1:17:56:738] (C Engine) | Report customization/generation begins |
    [2006/8/6 1:17:56:740] (C Engine) ----------------------------------------
    [2006/8/6 1:17:56:744] (C Engine) Processing XML report definition 1 of 1.
    [2006/8/6 1:17:56:745] (C Engine) *** Parsing the XML document ***
    [2006/8/6 1:17:56:746] (C Engine) Creating XML parser object...
    [2006/8/6 1:17:56:934] (C Engine) XML Parser Created!
    [2006/8/6 1:17:56:955] (C Engine) Parsing report definition in document buffer...
    [2006/8/6 1:17:57:910] (C Engine)
    Internal error
    [2006/8/6 1:17:57:916] (C Engine) ERROR: XML definition failed to parse!
    [2006/8/6 1:17:57:917] (C Engine) -------------------------------------------------------
    [2006/8/6 1:17:57:918] (C Engine) | Report customization/generation failed! |
    [2006/8/6 1:17:57:921] (C Engine) -------------------------------------------------------
    [2006/8/6 1:17:57:922] Error 50103 (C Engine): 01:17:57 ERR REP-6104: Invalid XML report definition.
    [2006/8/6 1:17:57:923] Error 50103 (C Engine):
    [2006/8/6 1:17:57:924] Error 50103 (C Engine): 01:17:57 ERR REP-0002: Unable to retrieve a string from the report builder message file.
    REP-6104: Invalid XML report definition.

    Hello,
    What format do you use for your Reports ? JSP ? XML ? RDF ? REP ?
    If you are using JSP or XML, try to save your Reports in Reports Buidler with the format RDF and use this RDF
    Regards

  • Error in creating XML Report Definition

    I have used App Engine to generate XML & XSD file having multiple rowsets.
    Next I created a new Data Source of type rowset and uploaded thses 2 files.
    But when I try to create a new Report Definition with data source type as rowset and the Data source name created before it throws the following error
    Invalid XSD File: (235,18)
    This XSD file is not valid. Please correct the error and upload again.
    Could anyone assist me in solving this issue?

    Can you compare the XML tags from your file with the following example:
    <function name="f_1formattrigger">
    <textSource>
    <![CDATA[function F_1FormatTrigger return boolean is
    begin
      null;
      return (TRUE);
    end;]]>
    </textSource>
    </function>
    As I can see , in your file <textSource> tag is missing.
    Regards

  • How to show image in TestStand xml report

    Hi,
    I am using TestStand to run DLLs written over CVI.
    I am using the xml report for collecting results.
    Some of the tests i run require showing images on the report -
    I would like to know how to allow showing an image on xml report by writing a CVI code.
    Thanks,
    Moshik

    Hi Moshik,
    There is an example for inserting images in your report in this discussion:
    http://forums.ni.com/ni/board/message?board.id=330&message.id=2819&requireLogin=False
    TestStand uses the sequences named reportgen_***.seq that default to the
    C:\Program Files\National Instruments\TestStand 3.5\Components\NI\Models\TestStandModels directory for report generation.
    You can edit the reportgen_xml.seq for XML reports.
    Is it really necessary for your DLLs to do the image insertion?
    Gavin Fox
    Systems Software
    National Instruments

  • Imported image error - REP-6106: Error in XML Report Definition

    I created a report with an image using Insert/Image. I've tried bmp, gif, jpg. The reports works fine so I save it. When I reopen this file, I get the REP-6106 error message "Invalid element 'image' in content of 'repeatingFrame'. expected elements [comments, geometryinfo...etc.....]".
    Any ideas?
    Thanks,
    Albert

    This is a bug, I have filed bug 2546295 to track this.
    Thanks for finding this.
    -Shaun

  • How to specify page encoding for XML reports.

    Hi,
    Environment: Apps:11.5.10, Oracle Reports: 10g
    I'm trying to generate XML tags by using a "rdf" report (10g).
    Initially I generated the XML tags before moving the report to server. In the output file I got
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    Then I moved the report to server and made the concurrent program output to XML.
    In the concurrent program output the tag is
    <?xml version="1.0" encoding="&Encoding"?>
    The output shows error
    ===============
    XML Parsing Error: XML declaration not well-formed
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    <?xml version="1.0" encoding="&Encoding"?>
    Its clear that there is something wrong with page encoding format which has to get assigned while run time. But its not happening so.
    How to specify the page encoding format?
    Any help would be appreciated.
    Thank you
    BKR.
    Edited by: BalaKrishna Reddy Avuthu on Aug 14, 2009 2:00 PM

    Remove the encoding so it says:
    <?xml version="1.0"?>
    Also, you will get a similar error if your xml tags for fields contain any special characters like & or #.

  • XML Publisher report definitions not opening

    Id like to reimport all the XML Pub Report definitions into my PS instance.
    I have a PT 8.49 instance and whenever i click on the report definitions of the XML publisher i get this JAVA error:
    "Java Exception: java.lang.NoCl assDefFoundError: com/peopleso ft/pt/xmlpublisher/PTRTFPocess or: finding class com.peopleso ft.pt.xmlpublisher.PTRTFPocess or (2,725) PSXP_ENGINE.RTFProc essor.OnExecute  Name:generate XSL  PCPC:239  Statement:9 Called from:PSXP_RPTDEFNMANAGE"
    SCREENSHOT: http://imageshack.us/photo/my-images/4/al4q.png/
    I was thinking maybe I could export the report definitions from a working instance and import here. Does that seem like a solution that will work

    PSXPCLEAN isnt part of PT 8.49
    So i tried instead to migrate XMLP definitions using Application Designer from a working instance of PS CS.
    But there error is still the same:
    "Java Exception: java.lang.NoClassDefFoundError: com/peoplesoft/pt/xmlpublisher/PTRTFPocess or: finding class com.peoplesoft.pt.xmlpublisher.PTRTFPocess or (2,725) PSXP_ENGINE.RTFProcessor.OnExecute  Name:generate XSL  PCPC:239  Statement:9 Called from:PSXP_RPTDEFNMANAGE"
    Notice the underlined part.
    In the working instance it is "PTRTFProcess" not "PTRTFPocess"

  • Print Images in XML Report

    Hi,
    I do have a requirement to print digital signature in a Quote, the signature is been stored as a picture (longraw datatype per_images table) in HRMS Tables
    HRMS Responsibility -> people -> Enter and Maintain -> Picture, here we will upload the signature of a person and this need be printed in XML Report.
    In the Report Builder if we change the ‘file format’ to ‘Image’ we are able to display the image , but when we are register in APPS, we not able to get the image, even XML tags are not been generated.
    Regards,
    Satish.

    Here...this should help !
    BLOB image in XML Publisher

  • XML Publisher/Report Definition - Excel Template Issue

    Hi everyone,
    I'm Diego, and I've been getting some issue to upload/download Excel templates using XML Publisher and Report Definition.
    I've been working over Real Estate Module and I get an activity to make an Excel Report. I've made all necessary step to make an excel template; create a .xls template, uploading the file to XML Publisher Repository, creating a Report Definition associating a RDA, and so on...
    When I generate the file in the Web (DV), it doesnt work; when I download the final excel, it doesnt appear any information. It comes just the statics texts and formatting, the real data information inside xml doesn't appear at excel.
    I've made a lot of tests and changes, but without success.
    FYI, I've already made a .rtf template and it worked well.
    I'd really apreciate if anyone help me or at least having any clue about it.
    Thanks so much,
    Diego Santos

    Hi my friend,
    First of all, thanks for reply.
    I've checked the template definition, and it seems OK.
    I've created the XML Publish Repository with Object Type = TL, in excel template I didn't put any additional info, (the field Template Type = TYPE_EXCEL_TEMPLATE cames by default).
    As I told above, i've made many tests..with and without grouping, but no success.
    However, when I test it locally it works. When I test the .xls + xml using Template Viewer runs well. But when I download the .xls on Web, it didn't retrieve any data information. =/
    I've already downloaded this doc, and I'm using it as support.
    If you need any more information, pls let me know that I'll tell you in a sec.
    Thanks a lot,
    Diego

  • Java Exception in Main/Menu/Reporting Tools/XML Publisher/Report Definition

    Hi ,
    One know this error :
    Java Exception: java.lang.NoSuchMethodError: oracle.xml.parser.schema.XSDBuilder.build(Ljava/io/InputStream;Ljava/net/URL;)Loracle/xml/parser/schema/XMLSchema;: during call of com.peoplesoft.pt.xmlpublisher.PSXPXsdUtils.getLevel0ColNames. (2,763) PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:GetBurstFieldValues PCPC:3211 Statement:48
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:SetBurstFieldValues Statement:81
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:LoadReportDefn Statement:660
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula Name:SelectReportDefn Statement:744
    Called from:PSXPRPTDEFN.GBL.PostBuild Statement:36 The noted Java error was thrown during a call of the given method.
    It's if i Add a New Value in the report definition (Peoplesoft 8.5 , CRM ) : No customization in this
    Thanks in advance..

    Judging by the error, it looks like the xsd can not be constructed.
    I would start of by checking if the target location is defined in the Intergration Broker.
    PeopleBooks > PeopleTools 8.52: PeopleSoft Integration Broker Administration > Configuring PeopleSoft Integration Broker for Handling Services > Using the Target Locations Page to Set Target Locations for Services
    http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tiba/book.htm?File=tiba/htm/tiba08.htm#H3007

  • How to Apply XML PArtial definition in Character mode report

    Hi All
    I want to apply some XML code definition in Character mode report The same XML is working fine in Bitmap
    Plese give me some idea.

    Any update? .please give some idea..... members..plz

  • Incorrect UTF-8 encoded date in XML reports under German Win in March (IE error)

    TestStand XML reports are marked as UTF-8 encoded. But those reports generated under Win2k German in March (written as "März" in German) cannot be displayed in the Internet Explorer because the umlaut character of the month name is not correctly UTF-8 encoded.

    Hi
    I have attached the modified modelsupport2.dll and the ReportGen_Xml.seq which fixes the problem. I also attached the modified report.c and modelsupport2.fp files.
    If you have not made changes to modelsupport2.dll and reportgen_xml.seq you can add the modified files to \Components\User\Models\TestStandModels\ folder and the TestStand engine should use the version under the user folder.
    If you have made changes to ReportGen_Xml.seq and ModelSupport2.dll then you will need to move the changes in the below files to the files under the User folder.
    FYI: If you want to create a new component or customize a TestStand component, copy the component files from the NI subdirectory to the User subdirectory before customizin
    g. This ensures that installations of newer versions of TestStand do not overwrite your customization. If you copy the component files as the basis for creating a new component, be sure to rename the files so that your customization do not conflict with the default TestStand components.
    The TestStand Engine searches for sequences and code modules using the TestStand search directory path. The default search precedence places the \Components\User directory tree before the \Components\NI directory tree. This ensures that TestStand loads the sequences and code modules that you customize instead of loading the default TestStand versions of the files.
    I hope this helps.
    Regards
    Anand Jain
    National Instruments.
    Attachments:
    ModifiedFiles.zip ‏384 KB

  • How to display image stored in DB in XML report.

    Hi,
    I am trying to display an Image uploaded by custom Form's attachment in XML report.
    Can someone please share the steps or suggest a link...
    Thanks in advance.
    Madhav

    Check this out:
    http://blogs.oracle.com/xmlpublisher/2006/05/inserting_blobs_into_your_repo.html

  • Add image in excel ourput of xml report

    HI ,
    I want to add logo(image) in my excel output of xml report. I have created rtf template for this and put the logo in the template but it is not showing in my excel output. Can any one please advise on the same.
    Thanks in advance!!

    Hi,
    if are bursting the report with RTF Template and Excel Out Put image will not come that is an enhancement Request. that will be avilabel in future release.
    if u are not bursting the report then image will come
    copy the image directly into RTF Template or insert using insert option in Template. there is no specific condition that image has to be on top. that is left for u only.
    cheers,
    chintu

Maybe you are looking for

  • AJAB Asset balance sheet values not completely posted, Message AU075

    Hi Champs, 1. Herewith I am trying to close the Asset F Year 2007,but system does not allow me to close the same. > Diagnosis In company code 5500, which is to be closed, APC values have not been posted to Financial Accounting for all relevant deprec

  • Reg: HRforms converted to PDF and send email to individual employee

    Hi Experts, The requirement is convert the HR form output to pdf and send email to respective employee in standard transaction. I copied RPCEDTX0 to  ZRPCEDTX0 and include RPCEDS09 to ZRPCEDS09, the changes need to be done for individual PERNR, I hav

  • Having problems editing Quicktime Video

    I am trying to cut a portion of video and Quicktime is getting greedy. I have a 24 second portion that I want to remove. I use the markers to identify the section that I want to remove. I go to the Edit menu and click on Cut. The section disappears a

  • Problems with RAW - HELP!

    Hi there, I really hope someone can help me. I just got aperture. RAW files look bad on my mac. They have this oversaturated look. I use my nikon D70 to take RAW + JPEG and the jpeg looks good. BTW, it's the same problem in iPhoto. I uploaded convert

  • JavaScript within JSP

    Hi all !! I'm stuck up. Is there any way by which i can actually embed JavaScript within a JSP file that contains no JSP code. Actually it is file with .jsp extention but from within it holds only java script inside <script> tags. The prerequisite is