And/or if statement in rtf templates.

Hi all,
I'm using XML Publisher 4.5.
I have created a word template file (rtf) for my reports. I need to be able to show some content in the template file by using and and/or if statement.
fx. <?if:doc_type='STANDARD'?> OR <?if:doc_type='DEFAULT'?>
How can I do this?
In advance thank you.
Best regards
Kenneth

Hi D,
Thank you for your answer.
I have seriously thought about that solution; but I don't think it's a smart way to do it.
If i do it like that, i need to copy the whole table and paste it inside the if statements.
I have two xml elements that I need to make the decisions on. POH_PO_TYPE & CP_RELEASE_NUM.
POH_PO_TYPE can be: STANDARD, RELEASE or BLANKET.
CP_RELEASE_NUM can be: '' or N
If POH_PO_TYPE is RELEASE AND CP_RELEASE_NUM is not ''
OR POH_PO_TYPE is STANDARD
OR POH_PO_TYPE is BLANKET AND CP_RELEASE_NUM is ''
THEN show table (which contains the whole PO).
It shall show the content of the PO in any of these cases.
BR Kenneth

Similar Messages

  • Complex if statement in rtf template?

    Hello,
    I want to build an if statement in rtf template, the idea is like:
    <?if:address!='' and phone!=''?>
    <?end if?>
    what's the correct way to do it if it is possible? Thanks in advance!
    Shichao

    stevencallan wrote:
    Conditional statements, in the user guide or the report developer guide, depending on the version you use.
    Page 7-62 in the 10.1.3.2 user guide:
    Use an if statement to define a simple condition; for example, if a data field is a specific value.
    1. Insert the following syntax to designate the beginning of the conditional area.
    <?if:condition?>
    2. Insert the following syntax at the end of the conditional area: <?end if?>.
    For example, to set up the Payables Invoice Register to display invoices only when the Supplier name is "Company A", insert the syntax <?if:VENDOR_NAME='COMPANYA'?> before the Supplier field on the template.
    Enter the <?end if?> tag after the invoices table.Thanks for the reply. But what about two conditions in one if statement? That was my question. :)
    Shichao

  • Choose statement in rtf template

    Hi Gurus!
    I'm building a report on rtf template (Bi Publisher Addin for MSword).
    If I insert a "Choose statement", every time I run the report the content of choose go on a new row.
    I want to avoid this behavior and that the "choose" is show on the row where i put it in the template builder.
    Any Idea?
    Regards,
    Daniele

    not exactly a guru, but have you investigated using the @inlines context in your template?
    e.g.
    My condition was <?choose@inlines:?><?when@inlines:MY_CONDITION='1'?>One<?end when?>
    <?when@inlines:MY_CONDITION='2'?>Two<?end when?>
    <?otherwise@inlines:?>something completely different<?end otherwise?>
    <?end choose?>

  • Error: If statement in RTF template in BI Buplisher

    All,
    Can some help me to solve the below issue. Please find the code below one which is extracted from the water mark block in RTF template.
    <?if:(sum(//g_data[fiscal_period=/asset/p_fiscal_period]/q2_op_plan_ytd))>0?><?( sum(//g_data[fiscal_period=/asset/p_fiscal_period and q1_task_top="Opex"]/q1_cost_plan_ytd) ) div
    *(sum(//g_data[fiscal_period=/asset/p_fiscal_period]/q2_op_plan_ytd) ) ?><?end if?>*
    I wanted to apply if condition to the code after the " div " as if I get any value for q2_op_plan_ytd as zero the it should replace with 1.
    Please help me on this

    Solution found.

  • BI Publisher : SELECT statement in RTF template

    Hi Guys
    I have written a BI Publisher Report using XML file created from Oracle Reports(in Oracle Apps).
    Repors runs from Oracle Apps perfectly ok. Now I need to fetch some data from couple of tables and display on the Report.
    I am wondering whether I can directly code SELECT statement in RTF file rather than messing with Oracle Report(.rdf) file.
    Please advise.
    Thanks and Regards
    Vijay

    Hey Vijay,
    You cannot query in RTF using select :)..
    You have to mess/play with RDF to do it ;)
    Oh wait, did i say , we cannot in RTF, we can , but that is difficult approach to go with., keep this as an end of the world option.

  • Unable to Maintain different Headers and footers in a multiple RTF template

    Hi All,
    I have a very complex requirement to Print Custom Invoice reports. The Report Consists of Three Templates 1) Invoice 2) Custom IMEI 3)Remiitance Slip.
    I have coded XMl such that for a given header level data all the corresponding data will be generated Including for Custom IMEI and Remittance Slip. So for the RTF design, In a word document i have three templates and the for every transaction all this three should be printed. so if there are 10 transactions than we need to print 10 sets (all 3) of invoices. The first Template is Invoice which has a header with all required information. If for the first template the lines data exceeds first page then on the second page the header needs to be printed only as Customer name, Transaction Num and page number. if the line level data goes more than 2 pages than the header needs to be same as that of 2nd page. On the last page of invoice template the totals and footer needs to be printed.
    After completion of invoice template Custom Imei template and remittance template must be printed for given transaction. But they shouldn't have any header or footer associated.
    Is this Functionality achievable by Oracle BI publisher RTF design?? If yes how would i code it in RTF. I have tried almost all possible solutions given in XML publisher User guide. Invoice template header and footer are repeating in other templates too.
    Issues are : 1) All there templates are tied together, so the header in First template, if it's line level data exceeds to second page should be different.
    2) Footer of the First template should only be displayed at the end of first template with Invoice totals.
    3) Header and Footer should not be part of template 2 and 3 which are tied to template one.
    Please, help me out with a solution, if needed i will provide the XML and RTF template too. I hope Someone really knows how to break this puzzle. Thanks for the help in advance

    Hi,
    My Req was for Three different templates tied together. So, if the First template exceeds page 1 then itz header should be a different one. Similarly with second template but they were independent of each other.
    In Your case you may probably try using MS word different First page header functionality to acheive different header from second page.
    Does this help?

  • Trying to represent Min and Max date on a rtf. template, please help :-(

    Hi all,
    I'm a little bit disappointed. I make effort to write questions with the hope someone in this forum can help me, but it seems nobody has interest about it.
    I try once again:
    I am tryin to represent a From Date and To Date. My XML File looks like:
    <ServiceRequest
    <Created
    08/04/2003 07:34:21</Created
    <aENumber
    </aENumber
    <CheckResultCommentUAW
    </CheckResultCommentUAW
    <CheckResultCommentUAW
    </CheckResultUAW
    <ABCCategory
    </ABCCategory
    <ChargeNumber
    </ChargeNumber
    <ABCEndDate
    </ABCEndDate
    <ABCStatus
    </ABCStatus
    <ABCTransferStatus
    </ABCTransferStatus
    <ClosedDate
    </ClosedDate
    <ContactAccountName
    FGD Enterprise</ContactAccountName
    <ContactCTIFaxInbound
    </ContactCTIFaxInbound
    <ContactCTIPhoneOutbound
    +4904217280677</ContactCTIPhoneOutbound
    <ContactDepartment
    </ContactDepartment
    <ContactEmailAddress
    [email protected]</ContactEmailAddress
    <ContactFirstName
    Kate</ContactFirstName
    <ContactLastName
    Middleton</ContactLastName
    <ContactSalutation
    Miss</ContactSalutation
    <ContactSubject
    Psychoth.</ContactSubject
    <ContactTitle
    </ContactTitle
    <ContactType
    Doctor</ContactType
    <CreatorFirstName
    Iris</CreatorFirstName
    <CreatorName
    Ramos</CreatorName
    <Description
    Questions about Suprare.</Description
    <JoinedContactAccountId
    1-L8-676</JoinedContactAccountId
    <PTCNumber
    </PTCNumber
    <Product
    Novasitin</Product
    <ProductBusinessUnit
    BU Winters</ProductBusinessUnit
    <SRNumber
    1-1043652</SRNumber
    <SRType
    Speciality Service Request</SRType
    <SolutionDescription
    WLvbf</SolutionDescription
    <Status
    Open</Status
    <TemporaryContactName
    </TemporaryContactName
    <TemporaryPhoneNumber
    </TemporaryPhoneNumber
    <ABCDateReceived
    </ABCDateReceived
    <ABCLinkedProductName
    Novasitin 1</ABCLinkedProductName
    <ABCNoofUnitsReceived
    </ABCNoofUnitsReceived
    <ABCRefundReplacement
    </ABCRefundReplacement
    <ABCSampleStatusReceived
    </ABCSampleStatusReceived
    <ABCSolutionDescription
    </ABCSolutionDescription
    <VisitCompleteAddress
    The Parskinson 3</VisitCompleteAddress
    <Login
    A456788</Login
    <ListOfSRInternalProducts
    <SRInternalProducts
    <MaterialNumber
    134152</MaterialNumber
    <ProductName
    Novasitin 1</ProductName
    <BatchNumber
    </BatchNumber
    <ReplacementRefnd
    </ReplacementRefnd
    <SampleAmount
    </SampleAmount
    <SampleRecievedDate
    </SampleRecievedDate
    <SampleStatus
    </SampleStatus
    </SRInternalProducts
    <SRInternalProducts
    <MaterialNumber
    KTA</MaterialNumber
    <ProductName
    Novasitin</ProductName
    <BatchNumber
    </BatchNumber
    <ReplacementRefnd
    </ReplacementRefnd
    <SampleAmount
    </SampleAmount
    <SampleRecievedDate
    </SampleRecievedDate
    <SampleStatus
    </SampleStatus
    </SRInternalProducts
    </ListOfSRInternalProducts
    </ServiceRequest
    </listOf_ssServiceRequest
    As you see the date has the format 08/04/2003 07:34:21, but I want to represent it like 04.08.2003. I have this on my template:
    <?xdoxslt:set_variable($_XDOCTX, ‘minYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?>
    <?xdoxslt:set_variable($_XDOCTX, ‘maxYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?>
    and the loop:
    <?for-each:ServiceRequest?>
    <?if: xdoxslt:date_diff(‘s’, xdoxslt:get_variable($_XDOCTX, ‘minYear’), xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’), $_XDOLOCALE, $_XDOTIMEZONE) < 0 ?>
    <?xdoxslt:set_variable($_XDOCTX, ‘minYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?><?end if?>
    <?if: xdoxslt:date_diff(‘s’, xdoxslt:get_variable($_XDOCTX, ‘maxYear’), xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’), $_XDOLOCALE, $_XDOTIMEZONE) > 0?>
    <?xdoxslt:set_variable($_XDOCTX, ‘maxYear’, xdoxslt:to_char(concat(substring(Created, 4,2), ‘.‘,substring(Created, 1, 2), ‘.‘,substring(Created, 7, 4)), ‘DD.MM.YYYY’))?><?end if?><?end for-each?>
    So it gives me all the Service Request records in the time range. For example From Date: 31.01.2005 til To Date 01.02.2005.
    It doesn't give me the To Date result unfortunately, it gives me the correct From Date, but as To Date the result is the same as From Date, what is false.
    The results should be:
    From Date: 31.01.2005
    To Date: 01.02.2005
    Can anybody help me? please?
    Regards

    I can but I was looking for a direct API use if possible here. Our library is so compilcated that I can't use the direct select statement.
    Well thanks, I will be using the select max, min and further writing another API for my use.
    Regards,
    KP

  • AND within IF statement in XML publisher

    Hi All,
    I am in need to use AND condition within an IF statement in rtf template.
    Here is the condition I am using
    <if:../../DIST_SHIPMENT_COUNT!=1 AND ../../ADDRESS_DETAILS/ADDRESS_DETAILS_ROW/LOCATION_ID!=SHIP_TO_LOCATION_ID?>
    My data
    <?end if?>
    This is not working, does anybody know how to achieve this.
    Appreciate your time and help.
    Thanks,
    Ragul

    so you mean to say
    ../../DIST_SHIPMENT_COUNT!=1 AND ../../ADDRESS_DETAILS/ADDRESS_DETAILS_ROW/LOCATION_ID!=SHIP_TO_LOCATION_ID
    and
    DIST_SHIPMENT_COUNT!=1 and LOCATION_ID!=SHIP_TO_LOCATION_ID
    conditions are different?
    exactly
    I have always refered to data elements in the RTF without giving any path and it works fine for me. is there anything that I may be missing?
    so you may be have simple case or may be not need to use parent tags logic
    so crazy example
    <ROWSET>
        <G2>
            <DIST_SHIPMENT_COUNT>0</DIST_SHIPMENT_COUNT>
            <ADDRESS_DETAILS>
                <ADDRESS_DETAILS_ROW>
                    <LOCATION_ID>2</LOCATION_ID>
                </ADDRESS_DETAILS_ROW>
            </ADDRESS_DETAILS>
            <G1>
                <ROW>
                    <SOMEROW>some text 1</SOMEROW>
                    <DIST_SHIPMENT_COUNT>1</DIST_SHIPMENT_COUNT>
                    <LOCATION_ID>3</LOCATION_ID>
                    <SHIP_TO_LOCATION_ID>3</SHIP_TO_LOCATION_ID>
                </ROW>
                <ROW>
                    <SOMEROW>some text 2</SOMEROW>
                    <DIST_SHIPMENT_COUNT>1</DIST_SHIPMENT_COUNT>
                    <LOCATION_ID>3</LOCATION_ID>
                    <SHIP_TO_LOCATION_ID>3</SHIP_TO_LOCATION_ID>
                </ROW>
            </G1>
        </G2>
    </ROWSET>
    and
    original condition:
    <?for-each:ROW?><?position()?> and value <?if: ../../DIST_SHIPMENT_COUNT!=1 and ../../ADDRESS_DETAILS/ADDRESS_DETAILS_ROW/LOCATION_ID!=SHIP_TO_LOCATION_ID?><?SOMEROW?><?end if?><?end for-each?>
    your condition:
    <?for-each:ROW?><?position()?> and value <?if: DIST_SHIPMENT_COUNT!=1 and LOCATION_ID!=SHIP_TO_LOCATION_ID?><?SOMEROW?><?end if?><?end for-each?>
    and result as
    original condition:
    1 and value
    some text 1
    2 and value
    some text 2
    your condition:
    1 and value
    2 and value

  • RTF Template Logo boarders get changed in apps pdf output

    Hi,
    I developed rtf template with logo , rtf page header is 0" and margins are 0.2" and 0.25" (minimum for ms word to print).
    I don't want to have any space b/w header and logo.
    Preview in rtf template in pdf format is showing with correct margins.
    But when i print the pdf preview, the logo changes its positin..ie..margins get changed.
    when i attach to template in apps, the pdf output is coming with different boarders sizes.
    PDF O/P is having space at the header ie..b/w header and logo.
    any suggestions.
    Thanks.

    I figured out why the layout is changing when I print - page scaling option in Adobe was set to 'fit to printable area'. Is there some way that I can ensure whomever prints the file (3rd party provider) has this setting turned off? A command embedded in the template? A config file?
    Any help would be sincerely appreciated.......

  • Resetting Header and Footer in RTF templates

    Hi,
    I developed an RTF template (template 1). This template contains start:body and end body for printing the header and footer in all pages. After printing this template then i have to call another template(template 2) from this. I called the template (template 2) using call statement. But the probelm is that the header and footer of template1 is printed in the output of template2 .
    I dont want to print this header and footer for template 2. Can anyone please suggest me in doing this. I placed start:body and end body in the second template with the assumption that 1st template's header and footer will be overwritten. But if i preview then am getting the error
    Font Dir: C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: C:\Documents and Settings\kpoda\Desktop\Invoice Printing Efficiencies\Sample XML Data\Sample Output4.xml
    FOProcessor setLocale: en-us
    each
    Please sugget.
    Thanks

    Hi,
    Do you have two templates (template1 & template2) that you want to display in the same document where the pages for template1 has one set of header and footers; and template2 has another set of header and footer?
    If that is the case you can simply create a new section in your rtf template so you have section1 and section2.
    In the body of section1 you call template1 and template2 in the body of section2.
    You can then have different header and footers for the two templates in the same document.
    BR Kenneth

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

  • Find and replace in RTF Template

    Hi,
    I'm using a if statement in my template, but i need to change a value within this statement. It's being used multiple times, therefor it would be easier to do a find and replace, is there a way to do a find and replace within the RTF template? Already openede it in Notepad++, but no luck
    Osman

    I don't think there is a way to find and replace all.. You can view all the code by using Field Browser -> Show All and then replace the code and update one by one from there..
    Thanks,
    Bipuser

  • .rtf template and bi server repository failure (newbee tutorial)

    I've installed BISE1 on Windows Server 2003 and followed the tutorial. I successfully fulfilled all the excercises except the last one: the creation of Oracle BI Publisher Report from BI Server Metadata. I have created .rtf template in Word. The preview of the template is working showing data. But when I connect to BI Publisher and open From BI Server report and click View I get the message: "The report cannot be rendered because of an error, please contact the administrator." And as the error detail: String index out of range: -1
    What could be the reason of that problem? Or where to search for the solution of that problem?
    Any help for newbee will be appreciated.
    Regards
    Adam

    Hi,
    I am having the exact same issue.
    I've created a .rtf template using Oracle BI Publisher Desktop. I insert a very simple table and a very simple Chart (a bar graph) just to test it out. The table and the chart wwere showing correct data in the rtf and the pdf when I preview it on the BI server located on my local machine, and when I click on validate template in word, no errors were found. However when I run the pdf in the client BI Publisher Server, the charts doesn't show up in the pdf output while the other contents (headers, tables) are displayed correctly. If I select the html output in the client BI Publisher server, it gives the same error mention above: The report cannot be rendered because of an error, please contact the administrator." And as the error detail: String index out of range: -1
    What security configurations do I have to check? If anyone can give a more detail explanation on this will be greatly appreciated. Thanks in advance!

  • Header and footer of RTF template not getting carried over to Excel output

    We have Header and Footer in RTF template defined. The output of the report will be in Excel. When we run the report, the header and footer on the report are not getting carried over to excel has header and footer, instead the header and footer are printed as first line on the excel. Also, the RTF template is set to landscape but when the output is generated in excel, it is set to Portrait

    hi..
    chk this presentation...
    http://csc-studentweb.lrc.edu/swp/Berg/articles/NW2004s_what_is_new.ppt#352,3,Why NW 2004s?
    http://www.sap-hefte.de/download/dateien/1090/086_leseprobe.pdf'
    hope this helps...

  • RTF templates and word cell padding.

    Hi.
    I'm having a problem with numbers in an XML Publisher report. Generated RTF templates don't seem to retain the cell padding properties.
    Has anyone got any suggestions on how to get round this?
    Thanks.
    Steve.

    Well there appears to be a bug in the RTF generator.
    It appears that Oracle want to use paragraph left and right indentation properties to pad text in cells away from cell borders. There is a bug in the rtf reader in word that causes problems if cell padding properties are used so paragraph indentation appears a sensible work round.
    By default there appears to be a left hand indentation of 5 applied to all paragraphs in cells. If a left hand cell maring is applied to cells then the left hand cell margin in the report increases in size.
    However, right hand cell margins appear to be ignored and NOT written as attributes to cell paragraph text in the the generated report, and this causes problems when trying to print an RTF report as numbers in cells get clipped by cell borders.
    Edited by: user7137712 on 18-Mar-2010 03:21

Maybe you are looking for

  • Help to create SUBPARTITIONS

    HI, I am getting error while creating a SUBPARTITION for my table. CREATE TABLE Tab1 col1 NUMBER(12), col2 CHAR(1 BYTE), col3 CHAR(1 BYTE), col4 NUMBER(12) PARTITION BY LIST (col1 ) SUBPARTITION BY HASH (col4) SUBPARTITION TEMPLATE( SUBPARTITION SP_1

  • Help -- I have a Lenovo Samsung SSD MZ7PC256HAFU on HP laptop -- ssd firmware will not update

    1.  i tried updating the SSD firmware by doing it with the samsung magician software --- it does not see the SSD 2.  then i tried doing it with the Lenovo iso found here: http://support.lenovo.com/en_US/detail.page?LegacyDocID=MIGR-69806 this suppose

  • Fiscal year closing error

    Dear Expert, When I was trying to run AJAB to close fiscal year 2007 and I got an error message "The planned depreciation was not completely posted to Financial Accounting for asset 017000000000-0000 in company code 0011 in depreciation area 01u201D

  • Problem Displaying Reports in MSS

    Am using Netweaver Portal Version - :"7.00.200611091758" For HR Reporting am are executing reports in a scenario. There is an intermediate screen "organisational view" where we can select the input for different reports. So for example. We want to ex

  • Adding Acrobat 9 to laptop

    Trying to install Acrobat 9 Standard, which I purchase in 2008 on laptop. Install says serial # is invalid.  I copied it from My Account and pasted it in field.  Can't be invalid. What's the deal?