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?>

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

  • 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.

  • 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

  • Problem with IF THEN ELSE in RTF template

    HI ALL,
    I have two layouts in the RTF template. Based on the parameter value it has to show the value.
    For example if P_State='United States' then first layout should come. else second one should come.
    I tried to use the IF Then else logic through the form field but i am getting error.
    Please help on this to get it.
    Regards
    Boopathi

    You can do that.
    i guess, the syntax you are using is wrong.
    please refer documentation or this forum for choose:
    Use choose statement. it s better.
    Or send me the template to my id in my profile. or upload it here http://apps2fusion.com/forums/viewforum.php?f=60

  • Subtrating variables in RTF templates

    Hi,
    I am trying to subtract two variables, but it seems something is wrong.Please help me out.
    Here's my code:
    <?choose:?>
    <?when:xdoxslt:get_variable($_XDOCTX,'Var2')=(xdoxslt:get_variable($_XDOCTX,'Var1'))?>-<?end when?>
    <?otherwise:?><?xdoxslt:div((xdoxslt:get_variable($_XDOCTX,'Var2')-xdoxslt:get_variable($_XDOCTX,'Var1')),xdoxslt:get_variable($_XDOCTX,'Var1'))?><?end otherwise?>
    <?end choose?>

    I am trying to subtract dates in an RTF template
    <?xdofx:if substr(EXP1_3,1,10) - substr(INVOICE_DT,1,10) >= 91 then (PYMNT_GROSS_AMT) end if?>
    I don't get any error messages or anything, but it is inconsistent at best,
    My EXP1_3 value is 05/31/2012 and one of my INVOICE_DT values is 04/12/2012,, in which case this statement should NOT be true and it should not return the value of PYMNT_GROSS_AMT,,but it does ?

  • 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 .... ?

  • Insert Image in RTF Template Conditionally

    Can an image be inserted into an RTF Template using an If-Then statement? Like this:
    <?if:FIELD1='IMAGE1' 'insert IMAGE1' else 'insert IMAGE2'?>
    If this is possible what syntax needs to be where the example says 'insert IMAGE1'? The images are jpg files that exist on a local PC but the template will run on a Unix machine.
    Is there a way to do this? Thank you very much.
    James

    you can try like this
    <?template:image?>
    <?if:FIELD1='IMAGE1'?>
    IMAGE1
    <?end if?>
    <?if:FIELD1!='IMAGE1'?>
    IMAGE2
    <?end if?>
    <?end template?>
    use this tag where u need image <?call:image?>
    for image location or dynamic images check these links
    https://blogs.oracle.com/xmlpublisher/entry/dynamic_images
    https://blogs.oracle.com/xmlpublisher/entry/one_of_our_images_is_missing
    http://learnobi.blogspot.com/2012/08/dynamic-image-in-rtf-of-oracle-bi.html
    Signature image on template

  • "Or" condition in RTF Template

    Hello,
    In my RTF template, I try to test a statement for two values. I tried
    <?xdofx:if :A!='0' or B!= '0'?>
    <?if:A!='0' or B != '0'?>
    It doesn't work : there isn't any error but the result is wrong.
    Is there another syntax I've got to use ?
    Thanks
    Version : BI Publisher 10g
    Edited by: jbg on 4 oct. 2011 23:49

    Condition usage looks fine.
    Do these conditions individually work? Whats is your requirement?
    If possible paste a sample xml here

  • Issue in RTF Template

    Hi All,
    Could you please solve the following requirement:
    Requirement: In my RTF Template for the fisrst page we are displaying parameters of the report.
    In the second page we have 2 tables one is for statement and other one is for Receipt.
    My requirement is in the second page i need to display "statement table" at the starting of
    second page[i.e @Header part] and "receipt table" at the end of the second page[i.e @tailor part].
    My issue is if statement table is having many rows some of the rows are skipped and displayed at 3rd page.and the receipt table is @ 2nd page.
    If receipt table is having many rows it is breks into two dispalyed at the end of second page and starting of 3rd page.
    Can anyone please provide me the solution.
    Thanks in Advance,
    Dhanasurya
    Edited by: DhanaSurya on Nov 6, 2009 1:06 AM

    Hi Dhanasurya,
    It sounds like you are using headers and footers, and that what you seeing is standard expected functionality.
    You could try extending your header/footer regions to make them bigger, but if there are too many rows of course then the tables will break across pages.
    Depending on your requirements you could limit the number of rows so they always if on one page, otherwise you'd need to either accept the data will break across pages, or implement something like Fixed Row Enumeration.
    Regards,
    Gareth

  • Variables in RTF template?

    Variables in RTF template?
    I am battling with variables in RTF template.
    (1) I need to declare and set a variable.
    (2) I like to print it out - check for value
    (3) then I need to make some conditional formatting IF-THEN-ELSE depending on variable value
    THIS DON'T WORK AT ALL (1,2,3):
    (1) declare a variable
    <xsl:variable name="MYCOUNT" select="count(LINE_LOCATIONS/LINE_LOCATIONS_ROW/SHIPMENT_NUM)"/>
    (2) print-out-a-value
    <xsl:value-of select="$MYCOUNT"/>
    (3) IF-THEN-ELSE statement
    <xsl:if test="$MYCOUNT > 1"><xsl:value-of select="concat('mo','re')"/></xsl:if>
    <?if:MYCOUNT="1"?><xsl:value-of select="concat('o','ne')"/><?end if?>
    THIS WORK (1,2) BUT (3) don't work in any way !!!
    (1) declare a variable
    <?xdoxslt:set_variable($_XDOCTX, MYCOUNT, count(LINE_LOCATIONS/LINE_LOCATIONS_ROW/SHIPMENT_NUM))?>
    (2) print-out-a-value
    <?xdoxslt:get_variable($_XDOCTX, MYCOUNT)?>
    (3) IF-THEN-ELSE statement
    <?xdofx:if MYCOUNT=1 then 'one' else 'more' end if?>
    <?xdofx:if $MYCOUNT=1 then 'one' else 'more' end if?>
    <?xdofx:if xdoxslt:get_variable($_XDOCTX, MYCOUNT)=1 then 'one' else 'more' end if?>
    Can someone help me haw to compare a value of variable with constant or another variable or node-value ?
    thx.

    <?xdoxslt:set_variable($_XDOCTX, ‘COUNT’,’YY’)?>
    <?xdoxslt:get_variable($_XDOCTX, ‘COUNT’)?>
    <?if:(xdoxslt:get_variable($_XDOCTX, ’COUNT’)) = ‘YY’?> YEss<?end if?>
    <?if:(xdoxslt:get_variable($_XDOCTX, ‘COUNT’)) = ‘HH’?> Helooo<?end if?>
    <?xdoxslt:set_variable($_XDOCTX, ’YY’, 15)?>
    <?xdoxslt:get_variable($_XDOCTX, ’YY’)?>
    <?if: (xdoxslt:get_variable($_XDOCTX, ’YY’))=15?>Yes Yes<?end if?>
    Variable name is 'COUNT'

  • Condtions on Watermark in RTF template

    How to use the conditions on watermark in RTF template.
    How to display the Instances names on back ground of the RTF template.If it is DEV instance it should display as "This is DEV Document",if it is TST instance it should display as "This is TST Document".
    For this I am using the water mark.I have written the condition on watermark text field.
    <?if: INSTANCE_NAME!='PROD'?>This is DEV Document <?end if?>
    In the above statement is displaying as 'This is DEV Document' on DEV instance.But if I move the same code into PROD instance it is displaying the same message.(Actually on PROD it should not display the message)
    I think this condition is not working.(I think text message is displaying as it is.)
    Please any body help/suggest/guide me to resolve this issue.
    Thanks & Regards,

    check the xml file and see if instance name is populated correctly.
    for testing purpose try the reverse way around and print only if the instance_name = 'DEV'
    http://sureshvaishya.blogspot.com

  • 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

Maybe you are looking for

  • Hardware or software issue?

    I have a new computer (i3 2100T CPU with intel hd2000 graphic, Asrock H67M-ITX/HT motherboard), and I have a strange problem with it. From time to time in some applications - only a few are affected e.g firefox, eye of gnome (image viewer), gimp - I

  • How to set up 6th Generation AirPort Extreme to cable modem as a wireless router and then connect my 3rd Generation Time Capsule to AirPort Extreme as a wireless extender?

    What is the best way to set up my 6th Generation AirPort Extreme (A1521) to my cable modem as a wireless router and then connect my 3rd Generation Time Capsule (A1355) to my AirPort Extreme as a wireless extender? I live in a small 1 story house and

  • I can't update Adobe Premiere

    I tried installing Adobe Premiere, and a notifcation popped up saying "update was successful but there were problems" and then told me that in order to fix any bugs I would need to update the app. I tried updating it but every time I try it says "upd

  • Nightly build users can't use the feedback feature

    Ever since I've started using Firefox beta (around beta 4, I think), I've been unable to submit feedbacks using the gigantic button that have only been waiting for some love. However, it just keeps saying that my firefox version of Firefox is too old

  • Oracle Parallel query

    Hi, I want to know what happens if we dont specify degree of parallelism in the parallel hint? It caused issues in our production database when patch upgraded from 9.2.0.5.0 to 9.2.0.7.0. there is one parallel hint on the table without DOP which work