Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Catalog field XML

Received Response
61
Views
6
Comments

Summary

Catalog field XML

Content

Hello Community,

 

I want to convert an XML File to PDF. In the XML there are some catalog fields (for example "1" = male und "2" = female). Is there any possibility to convert the 1 to "male" in the layout editor of the BI Publisher?

 

Thanks in advance

Tagged:

Answers

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    hello,

    you can do this multiple ways ..

    Option 1) change the SQL or source that is generating the XML to include logic to display Male for 1 and female for 2

    Option 2) create a conditional format to do the same, not sure if this can be done using the interactive mode, but definitely YES using a RTF template.

    Hope this helps

    --YG

  • Niclas Wagenknecht
    Niclas Wagenknecht Rank 4 - Community Specialist

    Sounds cool. I try that. Is it possible to use that for more than two codes? Something like else if?

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    yes .. below snippet from the user guide

    <?xdofx:if AMOUNT > 1000 then 'Higher'

    else

    if AMOUNT < 1000 then 'Lower'

    else

    'Equal'

    end if?>

    Pl Mark Complete / Helpful

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    Hello

    you can use a IF or CHOOSE to get that ... some like below

    <?xdofx:if GENDER =1 then 'MALE'

    else

    'FEMALE'

    end if?>

  • Niclas Wagenknecht
    Niclas Wagenknecht Rank 4 - Community Specialist

    Hello YGUTTIKONDA,

    Option 1 ist not feasible because it's not me who creates the XML File. I have no control over that.

    Option 2: I'm working in the MS Word Plug-in to create an RTF File. I found the field conditional format but I don't find a way to do what I want to do. I can only change text color or something like that.

    Window.png

    How can I change the text itself?

  • Niclas Wagenknecht
    Niclas Wagenknecht Rank 4 - Community Specialist

    Hi YGUTTIKONDA,

    there is another problem now. Unfortunately I may not use that hardcoding solution. We have lookup tables in a database for those code values and they change from time to time. Thats why I'm not allowed to hardcode those values in the report.

    What I need is the following: I would like to read the code value out of my XML file in the data model of the publisher and afterwards create a SQL statement to get the code name. My problem is that I don't get single fields out of my XML file in the data model. The whole XML file is one single field there.

    Do you understand what I mean and is there any possibility to solve that issue?

    Shall I open a new thread for that?

    Thanks

    Niclas