XML Publisher rtf output not consistent with the rtf created

I am using XML publisher to generate a custom report.
The approach I folllowed:
1) AM Class: Write the VO data to XMLNode using vo.writeXML() method
2) XML Publisher Administrator Responsibility: Create a data template and attach the xml created in step1 as "Preview Data"
3) XML Publisher Administrator Responsibility: Create a rtf template (contains images and text), attach the data template (step 2) and attach the rtf created.
4) Controller class: Use TemplateHelper.processTemplate() method, passing the rtf template and the XML data from VO.
5) Verify the rtf output in application.
Issues I am having are as follows:
1) Major issue is page format. I have saved my rtf file with a different page format as below:
     File->Page Setup->Paper->Width:255 pt
               ->Height:165 pt
     File->Page Setup->Margins->Top: 12 pt
                    ->Bottom: 0.1 pt
                    ->Left: 0.1 pt
                    ->Right: 12 pt
When I open my document from the application, the margins and page setup rtf output is not retained (as given in teh doc), hence my whole layout is disturbed.
Thus, I am getting a very weird layout when I open my rtf output from application.      
How can I retain the page settings?
2) I added a image, and the size of the image also is not retained as well.
And if I set the layout wrapping style anything other than "In line with text", the image does not show up in the output.
Would greatly appreciate if someone can put some light on this.

RTF & PDF output can't be exact same, we can minimize the difference by eliminating all extra spaces(Ex: from table rows, in between form fields etc.) from RTF while generating RTF output.
For reference:
BUG:8662322 - RTF FORMAT DOES NOT SHOWS WITH FIXED HEIGHT OF ROW
Thanks,
Sandeep

Similar Messages

  • RTF output not consistent with the PDF output

    Hi Experts.
    i would like to know why the code start@last-page works in pdf format but do not works if i generate the report in rtf format.
    Thanks in advance!

    RTF & PDF output can't be exact same, we can minimize the difference by eliminating all extra spaces(Ex: from table rows, in between form fields etc.) from RTF while generating RTF output.
    For reference:
    BUG:8662322 - RTF FORMAT DOES NOT SHOWS WITH FIXED HEIGHT OF ROW
    Thanks,
    Sandeep

  • After REFRESH the cached object is not consistent with the database table

    After REFRESH, the cached object is not consistent with the database table. Why?
    I created a JDBC connection with the Oracle database (HR schema) using JDeveloper(10.1.3) and then I created an offline database (HR schema)
    in JDeveloper from the existing database tables (HR schema). Then I made some updates to the JOBS database table using SQL*Plus.
    Then I returned to the JDeveloper tool and refreshed the HR connection. But I found no any changes made to the offline database table JOBS in
    JDeveloper.
    How to make the JDeveloper's offline tables to be synchronized with the underling database tables?

    qkc,
    Once you create an offline table, it's just a copy of a table definition as of the point in time you brought it in from the database. Refreshing the connection, as you describe it, just refreshes the database browser, and not any offline objects. If you want to syncrhnonize the offline table, right-click the offline table and choose "Generate or Reconcile Objects" to reconcile the object to the database. I just tried this in 10.1.3.3 (not the latest 10.1.3, I know), and it works properly.
    John

  • The rendered records are not consistent with the range

    After changing the range with record navigator to render the records,
    if navigate to other page and go back,the rendered records will not be
    consistent with the record range.
    The issue can be reproduced as follows.
    1.when select 1-10 range,the first 10 records are rendered.
    2.select [Next 10 records] to render the 11-13 records.
    3.change to other page and return to the original page.
    It is found that the 11-13 records are rendered but the range is 1-10.
    You can verify the issue by executing SampleMainPG.xml of the Tutorial.jpr for 11.5.10.2
    from Jdeveloper after changing the SampleMainCO.java as below.
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    if (pageContext.getTransactionValue("link") != null)
    OAAdvancedTableBean inner = (OAAdvancedTableBean)webBean.findChildRecursive("InnerTable");
    inner.clearCache(pageContext);
    inner.setAttributeValue("CLEAR_CACHE_ONCE_NOEXECUTE_ATTR", Boolean.TRUE);
    <==comment out these original source above.
    OAAdvancedTableBean outer = (OAAdvancedTableBean)webBean.findChildRecursive("OuterTable");
    outer.queryData(pageContext, false);
    <==add the two rows of source above to get the latest query data.
    you should to make the records of the table fwk_tbx_employees to be more than 10 just using the SQL script below.
    (just need to change EMPLOYEE_ID at your will)
    INSERT INTO fwk_tbx_employees (
    EMPLOYEE_ID,
    TITLE,
    FIRST_NAME,
    MIDDLE_NAMES,
    LAST_NAME,
    FULL_NAME,
    EMAIL_ADDRESS,
    MANAGER_ID,
    POSITION_CODE,
    SALARY,
    START_DATE,
    END_DATE,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY,
    CREATION_DATE,
    CREATED_BY,
    LAST_UPDATE_LOGIN,
    ATTRIBUTE_CATEGORY,
    ATTRIBUTE1,
    ATTRIBUTE2,
    ATTRIBUTE3,
    ATTRIBUTE4,
    ATTRIBUTE5,
    ATTRIBUTE6,
    ATTRIBUTE7,
    ATTRIBUTE8,
    ATTRIBUTE9,
    ATTRIBUTE10,
    ATTRIBUTE11,
    ATTRIBUTE12,
    ATTRIBUTE13,
    ATTRIBUTE14,
    ATTRIBUTE15 )
    VALUES (
    17,
    'ichiro',
    'yamada',
    'ichiro yamada',
    1,
    0,
    sysdate,
    sysdate,
    sysdate,
    0,
    sysdate,
    0,
    0,
    it seems that if use the functions below,the issue can be workarounded.
    But it is not clear whether there is any other impact from these functions.
    innerTable1.clearCache(pageContext);
    innerTable1.setAttributeValue("CLEAR_CACHE_ONCE_NOEXECUTE_ATTR", Boolean.TRUE);
    Could you please share your idea?
    Thank you very much in advance.
    Best regards,
    Wang

    FYI.  I was able to do what I wanted by first going to page properties and removing unwanted fonts from appearance.  Then edit the page, select all, change style to normal, then select the text where you want to use a different style and change style there.  This gives consistent appearance with both browsers.

  • SM37 spool output not matched with the mail received

    Hi All
    I have a background job which run on daily basis. After the job is finished successfully the spool is sent to client in the form of the html page.
    The mail received by client and the actual spool in R3 are not matching.
    Some of the text is missing at the end of the lines. Say like a row having 300 characters in the actual spool R3, 280 characters are only showing in the received mail of client, last 20 characters are missing.
    How to check the settings of Page width in SAP R3.
    Should i check the settings in the Mail configuration.
    Please advise
    Regards

    Hi
    Thank you for all the replies.
    The issue is related to the width of the output missing.
    The spool output is fine. Once this output is generated this wil be send to the spool recipient.
    spool output is different in the spool recipient and actual spool output produced in SM37. i.e  The width of the spool received in the spool receipient is missed. length is ok but widh is missing.
    Should i check in mail settings. Please help me
    Regards,

  • Vector selection is not consistent with the rest of the UI.

    When I select a text layer, it doesn't automatically select all of the text for me. 
    When I select a layer mask, it doesn't automatically go into quick mask.
    Yet when I select a vector, I'm automatically presented with an outline of the shape. At the moment I'm constantly pressing shift+ctrl+h all over the place just to dictate when I want to see my outline. Folders with vector masks do this right - I can select the vector by clicking on the vector, or I can select the folder by clicking on the folder or anywhere other than on the vector mask. 
    Don't force me into ctrl+shift+h-land. Just let me be able to click what I want to select.

    If the other devices are synced with iCloud, check the Calendars box in the iCloud preference pane.

  • BEA workshop design view is NOT consistent with the actual application

    When I move the cursor to one jsf component in the design view and hit the space bar several times, I can see the component is being moved to the right. However, when I deloy this application to the server, this change does NOT actually apply to the page. Any suggestions?
    Thanks,
    Jimm

    Try "Shift + Space" to introduce white space in design view and generate respective   in the source code.

  • Print of standard report "Check Register" not consistent with the report

    Hi
    I am trying to print a report generated by transaction FCHN. The display of report is correct but when i check the printout the last line item is missing in the print only.

    Hi ,
    print out from spool or direct? , if its spool then u need to check the settings of the spool to display all the pages.
    in SPO2->goto->display requests--->settings.
    regards
    Prabhu

  • In XML Publisher ....unable to load .RTF

    Hi ,
    I have just installed MS windows XML publisher as BI publisher download link not working.
    I started the xml server ,
    went to the url through firefox
    created/added a new data source through admin option
    crated a simple data model as
    select ename,job from emp
    created a new layout in .rtf format.
    when i upload the .rtf it uploads the same and then I have it .....
    but after saving the .rtf i can't see it in the layout as uploaded ...
    DO I have to specify some directory in the XML server where all .rtf will be saved ???
    this is my first installation ....hence no clue...
    I am using WINDOWS XP ?.....can someonw suggest please ?
    ta
    s

    i am using xml publisher for general report writing NOT FOR EBS...
    following is my data template which works fine and generates xml data
    <dataTemplate name="A_SIMPLE_REPORT">
    <properties>
    <property name="xml_tag_case" value="upper"/>
    </properties>
    <parameters>
    <parameter name="P_PARM" dataType="character"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="QUERYNAME">
    <![CDATA[
    select empno EMPNO
    , ename ENAME
    , job JOB
    from
    scott.emp
    where 'XYZ' = nvl(:P_PARM, 'XYZ')
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_UPPERGROUP" dataType="varchar2" source="QUERYNAME">
    <element name="EMPNO" dataType="varchar2" value="EMPNO"/>
    <element name="ENAME" dataType="varchar2" value="ENAME"/>
    <element name="JOB" dataType="varchar2" value="JOB"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Now I opened a ms word document :
    1)added a table with 3 columns and 2 rows
    2) added the below column headings with their subsequent tags in row 1 and 2 respectively for the table ?
    EMPNO     ENAME     JOB
    <?for-each:G_UPPERGROUP?> <?ENAME?> <?JOB?>
    <?EMPNO?> <?end for-each?>
    is my code correct ?
    ta
    s

  • 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 &quot;Partnering&quot;?(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,
    Mahi

    Mahi,
    you can't do that yet.

  • Publishing point is not starting in the windows media server

    In the setup VCS expressway starter pack is used as call controller & the endpoints are registered to it.  TCS is used for recording.  A existing publishing point is used for live streaming using windows media server.  This publishing point is not started when the recording starts for this recording alias.  Windows media server is running locally in the TCS.  I could see the below in the server logs.  Please note that this setup has worked with this configuration for more than a year and it stopped working now.  Your help on this greatly appreciated.  Thanks.
    13    2015-05-05T14:15:55+03:00    Info: Incoming call [address = 1000, address_type = CALLADDRESS_E164_ALIAS, call_id = 1, protocol = H323, rate = 5952]
    14    2015-05-05T14:15:55+03:00    Info: Getting conference binding [booking_address = 003] - No binding found, proceeding with ad hoc call
    15    2015-05-05T14:15:55+03:00    Info: Checking recording start time [conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, log_tag = 0, recording_id = , record_delay = off]
    16    2015-05-05T14:15:55+03:00    Info: Creating recording [conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, log_tag = 0, recording_id = ]
    17    2015-05-05T14:15:55+03:00    Info: Handling RTP packet [conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, log_tag = 0, recording_id = , time_since_first_packet = 1907] - Started writing media
    18    2015-05-05T14:15:55+03:00    Info: Creating call [call_id = 1, conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, direction = incoming, log_tag = 0, protocol = H323, speed = 5952, remote_address = 5001]
    19    2015-05-05T14:15:55+03:00    Info: Updating temp RTP filename in DB [conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, log_tag = 0, recording_id = 601B46BF-3756-4595-9100-71948A146FB7, temp_rtp_dump_file = e:\livedata\RTP150505141555_1.ogg.tmp]
    20    2015-05-05T14:15:55+03:00    Info: Setting call state to alive [call_id = 1, conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, direction = incoming, log_tag = 0, protocol = H323, speed = 5952, playback_number = 1520] - Found playback number
    21    2015-05-05T14:15:55+03:00    Info: Setting call state to alive [call_id = 1, conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, direction = incoming, log_tag = 0, protocol = H323, speed = 5952, playback_number = 1520] - Found playback number
    22    2015-05-05T14:15:56+03:00    Diagnostic: Setting playback main video frame rate [frame_rate = 30]
    23    2015-05-05T14:15:56+03:00    Info: Starting decoder [call_id = 1, conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, direction = incoming, log_tag = 0, protocol = H323, speed = 5952, bitrate_kbps = 128, channel = audio, payload_type = AAC-LD]
    24    2015-05-05T14:15:57+03:00    Info: Starting decoder [call_id = 1, conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, direction = incoming, log_tag = 0, protocol = H323, speed = 5952, bitrate_kbps = 4000, channel = video, payload_type = H.264]
    25    2015-05-05T14:15:57+03:00    Info: Decoding video, Message from decoder [call_id = 1, decoder = Codian Video, message = Initialized H.264 decoder]
    26    2015-05-05T14:15:57+03:00    Warning: Decoding video, Decoder reported error [call_id = 1, error_message = FAILURE to decode packet] - Sending FPU request
    27    2015-05-05T14:15:57+03:00    Info: Finding output size; bucketing [optimal_output_size = 1280x720(16:9), output_bucket = 796x448, size_ext = 1280x720(16:9), size_main = 512x288(16:9), squared_ext = 1280x720(16:9), squared_main = 512x288(16:9)]
    28    2015-05-05T14:15:57+03:00    Info: Transcode settings [extended_frame_rate = 0, extended_size = 1280x720(16:9), layout = 2, main_frame_rate = 0, main_height_ratio = 0, main_size = 512x288(16:9), negotiated_bitrate_kbps = 4128, output_bitrate_kbps = 800, output_frame_rate = 30, output_frame_rate_max = 30, output_size = 796x448(199:112), quality = 2, quality_bitrate_kbps = 800]
    29    2015-05-05T14:15:57+03:00    Info: Setting up encoding [conference_id = 904E92BB-9152-4CED-BF29-165F521E34B2, log_tag = 0, recording_id = 601B46BF-3756-4595-9100-71948A146FB7, template = <transcode conference_id="904e92bb-9152-4ced-bf29-165f521e34b2" thumbnail_path="E:\data\www\slides\904e92bb-9152-4ced-bf29-165f521e34b2\thumbnails\"><clips action="transcode"/><metadata name="mxe-unicast" speaker="" copyright="" keywords="" description="" date="1430824555"/><writer source="pipnopip"><template codec="windowsMedia" delivery="DELIVERY_ON_DEMAND" qualitybitrateK="800" layout="pipnopip" piplocation="top/right" quality="Medium"/><output type="file" guid="e1ab0747-bbb4-44f0-b7de-2644e3921e63" directory="E:\data\media\"/><output multicast="false" multicast_address="" multicast_port_start="0" multicast_ttl="0" type="serverpush" guid="e952a7fc-87dc-4944-b26a-064c9897c3de" wwwdir="E:\data\www\" server_name="xxx.xxx.xxx.xxx" username="admin" password="********" port="8080" publishing_point_copy="" publishing_point=""/></writer><callinfo bitrateK="4128" hasaudio="true" hasextended="true" hasvideo="true" videoFrames="0" extendedFrames="0" duration="0" mainres="512x288" maindar="16:9" extres="1280x720" extdar="16:9"/></transcode>]
    30    2015-05-05T14:15:57+03:00    Diagnostic: Setting thumbnail timer zero point [call_id = 1, zero_point = 0]
    31    2015-05-05T14:15:57+03:00    Warning: Decoding video, Decoder reported error [call_id = 1, error_message = FAILURE to decode packet] - Sending FPU request
    32    2015-05-05T14:15:57+03:00    Info: Decoding audio, Message from decoder [call_id = 1, decoder = Codian Audio, message = Initialized AAC-LD decoder 128000bps]
    33    2015-05-05T14:15:57+03:00    Warning: Decoding video, Decoder reported error [call_id = 1, error_message = FAILURE to decode packet] - Sending FPU request
    34    2015-05-05T14:15:58+03:00    Last message repeated 5 times
    35    2015-05-05T14:15:58+03:00    Info: Setting output path [call_id = 1, path = e:\livedata\143082455700-82801609.wmv]
    36    2015-05-05T14:15:58+03:00    Warning: Decoding video, Decoder reported error [call_id = 1, error_message = FAILURE to decode packet] - Sending FPU request
    37    2015-05-05T14:16:04+03:00    Last message repeated 25 times
    38    2015-05-05T14:16:04+03:00    Info: Checking memory use [private_MB = 460, private_MB_previous = 118, ram_free_MB = 3245, vm_used_MB = 597, vm_used_MB_previous = 201, working_set_MB = 184]
    39    2015-05-05T14:16:08+03:00    Warning: Reporting Windows Media writer status, Error occurred in WMT_ERROR [call_id = 1, address = http://xxx.xxx.xxx.xxx:8080/_3868463432921, error = error code = (0x80072eef)]
    40    2015-05-05T14:16:08+03:00    Info: Adding Windows Media serverpush output [call_id = 1, async = 0x80072eef] - After wait 

    The windows service for essbase in 11.1.2.x is an OPMN service "Oracle Process Manager..."
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • XML Publisher Desktop is having issue with one variable declaration

    Hello:
         I'm creating a check printing report in XML Publisher. When trying to run the preview for my template; it is throwing an error:
             Caused by: oracle.xdo.parser.v2.XPathException: Variable not defined: 'first_rec'.
          Below is the code in the text field of the template. I don't understand why it is throwing the above error. Any help is appreciated!
         <?for-each@section:OutboundPayment?><xsl:variable  xdofo:ctx="incontext" name="inner_group"  select=".//DocumentPayable"/><?for-each:$inner_group?><?if:(position()-1) mod $no_of_line_per_page=0?><xsl:variable name="first_rec"  xdofo:ctx="incontext" select="position()"/>
    Thanks.
    Message was edited by: Ora Person
    Can anyone in OTN community suggest the solution to the above problem? Suprise to see that no one responded to my question in past 3 days!!

    Refer
    Integrating Oracle XML Publisher with Oracle JDeveloper 10g

  • Preprocessing xml to replace all xpath references with the referred elements

    Hi,
    Is it possible to sort of pre-process xml before querying such as we replace all internal xpath references with the referred elements?
    So below is the xml and as we see the typeId element of second app.test.module.library.Publisher element refers to the typeId element in the first app.test.module.library.Publisher element through xpath reference . Seems this is done by XStream(which we
    use for xml-java) to reduce the size of resulting xml. This is all fine and in java one can easily traverse through such xpath references, but the challenge i am facing is in sql where i use node() function to get each of app.test.module.library.Publisher
    element and fetch value of selectedText element of both the children of app.test.module.library.Publisher - (typeId, regionCode). 
    declare @publishers xml
    set @publishers = '
    <publishers>
      <app.test.module.library.Publisher>
        <typeId>
          <selectedId>101</selectedId>
          <selectedText>Book</selectedText>
        </typeId>
        <regionCode>
          <selectedId>102</selectedId>
          <selectedText>NWD</selectedText>
        </regionCode>
      </app.test.module.library.Publisher>
      <app.test.module.library.Publisher>
        <typeId reference="../../app.test.module.library.Publisher/typeId" />
        <regionCode>
          <selectedId>101</selectedId>
          <selectedText>UWY</selectedText>
        </regionCode>
      </app.test.module.library.Publisher>
      <app.test.module.library.Publisher>
        <typeId>
          <selectedId>100</selectedId>
          <selectedText>Deposit</selectedText>
        </typeId>
        <regionCode>
          <selectedId>100</selectedId>
          <selectedText>WHU</selectedText>
        </regionCode>
      </app.test.module.library.Publisher>
    </publishers>';
    select typeId = el.e.value('(typeId/selectedText)[1]','varchar(max)')
          ,regionCode = el.e.value('(regionCode/selectedText)[1]','varchar(max)')
    from @publishers.nodes('/publishers/app.test.module.library.Publisher') as el(e)
    If you execute this, the second typeId value will be null but ideally I should be able to reach to the reference, which is typeId of first app.test.module.library.Publisher element and should be able to fetch selectedText of it, which is correct value (Book).
    In other words first two app.test.module.library.Publisher elements are of same type (Book).
    Since I am not able to find the way to do it, I thought I should have some way to process this xml to replace all such references with the referred element and that will eliminate the need to go for tedious xpath reference based access.
    Thanks

    I was able to get a result using dynamic SQL, but my guess is if you have more complicated examples it probably won't work.  I also make an assumption you know the full path of the first reference you want.  Anyway, try this:
    DECLARE @xml XML = '<publishers>
    <app.test.module.library.Publisher>
    <typeId>
    <selectedId>101</selectedId>
    <selectedText>Book</selectedText>
    </typeId>
    <regionCode>
    <selectedId>102</selectedId>
    <selectedText>NWD</selectedText>
    </regionCode>
    </app.test.module.library.Publisher>
    <app.test.module.library.Publisher>
    <!--<typeId reference="../../app.test.module.library.Publisher/typeId" />-->
    <typeId reference="../../app.test.module.library.Publisher/typeId" />
    <regionCode>
    <selectedId>101</selectedId>
    <selectedText>UWY</selectedText>
    </regionCode>
    </app.test.module.library.Publisher>
    <app.test.module.library.Publisher>
    <typeId>
    <selectedId>100</selectedId>
    <selectedText>Deposit</selectedText>
    </typeId>
    <regionCode>
    <selectedId>100</selectedId>
    <selectedText>WHU</selectedText>
    </regionCode>
    </app.test.module.library.Publisher>
    </publishers>'
    -- So you basically need to create and execute this string;
    -- but how do you work out the first bit of the string ?
    --SELECT @xml.query('(publishers/app.test.module.library.Publisher/typeId/../../app.test.module.library.Publisher/typeId)[1]');
    DECLARE @fullPath NVARCHAR(MAX) = 'publishers/app.test.module.library.Publisher/typeId/@reference' -- the full path of the reference
    DECLARE @shortPath NVARCHAR(MAX) = LEFT( @fullPath, CHARINDEX( '@', @fullPath ) - 1 ) -- full path without attribute name
    IF @shortPath IS NULL
    RAISERROR ( 'Unable to get @shortPath.', 16, 1 )
    -- Start processing the XML
    DECLARE @sql NVARCHAR(MAX), @reference NVARCHAR(MAX)
    -- Extract the reference
    SET @reference = @xml.value('(publishers/app.test.module.library.Publisher/typeId/@reference)[1]', 'NVARCHAR(MAX)')
    -- Construct the sql
    SET @sql = 'SELECT @xml.query(''(' + @shortPath + @reference + ')[1]'')'
    -- Execute the SQL
    EXEC sp_executesql @sql, N'@sql NVARCHAR(MAX), @xml XML', @sql, @xml
    Post back any issues you have with that approach and your real data.

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • Error :"The provider is not compatible with the version of Oracle client"

    Hi guys!
    I'm facing this problem:
    When my .Net application tries to access the DB, I get this error message above.
    The application is into the same machine of DB and the operational system is Windows Server Enterprise 64 bits.
    I'm comparing to another machine that has the same scenario but runs in Windows Vista 64 bits. This problem doesn't happen and I can normally access the DB.
    The both database versions are 10g Release 2 (10.2) and all components from Oracle Database Components 10.2.0.2.21 are installed as the containing bellow:
    -Oracle Data Provider for .NET 1.x 10.2.0.2.20
    -Oracle Data Provider for .NET 2.0 10.2.0.2.20
    -Oracle Developer Tools for Visual Studio .NET 2003 10.2.0.2.20
    -Oracle Developer Tools for Visual Studio 2005 10.2.0.2.20
    -Oracle Provider for OLE DB 10.2.0.2.20
    -Oracle Objects for OLE 10.2.0.2.20
    -Oracle Services For Microsoft Transaction Server 10.2.0.1.0
    -Oracle Net 10.2.0.1.0
    -Oracle Universal Installer 10.2.0.2.0
    Oracle.DataAcces.DLL is 2.102.2.20 and it is reference in my .Net app (that is published and located into IIS).
    These are the Oracle assemblies installes in 'C:\Windows\Assembly':
    Windows Vista Machine:
    ASSEMBLY NAME VERSION CULTURE PUBLIC KEY TOKEN PROCESS ARCHITECTURE
    Oracle.DataAccess 10.2.0.100 Neutral 89b483f429c47342
    Oracle.DataAccess 1.102.2.20 Neutral 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 pt-BR 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 it 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 fr 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 es 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 de 89b483f429c47342
    Oracle.Management.Omo 2.102.2.20 Neutral 89b483f429c47342 x86
    Oracle.VsDevTools 2.102.2.20 Neutral 89b483f429c47342 x86
    Policy.10.1.Oracle.DataAccess 1.102.2.20 Neutral 89b483f429c47342
    Policy.10.2.Oracle.DataAccess 1.102.2.20 Neutral 89b483f429c47342
    Windows Server Machine:
    ASSEMBLY NAME VERSION CULTURE PUBLIC KEY TOKEN PROCESS ARCHITECTURE
    Oracle.DataAccess 10.2.0.100 Neutral 89b483f429c47342
    Oracle.DataAccess 1.102.2.20 Neutral 89b483f429c47342
    Oracle.DataAccess 2.102.2.20 Neutral 89b483f429c47342 x86
    Oracle.DataAccess.resources 10.2.0.100 pt-BR 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 zh-CHT 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 zh-CHS 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 ko 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 jp 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 it 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 fr 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 es 89b483f429c47342
    Oracle.DataAccess.resources 10.2.0.100 de 89b483f429c47342
    Policy.10.1.Oracle.DataAccess 1.102.2.20 Neutral 89b483f429c47342
    Policy.10.2.Oracle.DataAccess 1.102.2.20 Neutral 89b483f429c47342
    Policy.9.2.Oracle.DataAccess 10.2.0.100 Neutral 89b483f429c47342
    Policy.9.2.Oracle.DataAccess 1.102.2.20 Neutral 89b483f429c47342
    What should I check and do to solve this problems?
    Thanks for help,
    Anderson

    Hi,
    Often the error "The provider is not compatible with the version of Oracle client" is raised when the unmanaged dll OraOpsX.dll can't be found, can't be loaded, or is the wrong version. For version 10.2.0.x of ODP.NET and .NET Framework 2.x the file should be called "OraOps10w.dll" and should be found in the %ORACLE_HOME%\bin directory.
    Since the ODAC pieces are installed on the same host as the database, are they in a separate Oracle Home or the same Oracle Home as the database software? If there are multiple Oracle Home directories, which one is in the system path first?
    I would start with verifying the version of OraOps10w.dll and the system path on the server. You might also confirm that the Oracle Home directory (and everything under it) has the following permissions for Authenticated Users:
    - Read & Execute
    - List folder contents
    - Read
    Regards,
    Mark

Maybe you are looking for