Syntax on XML Publisher while converting code from crystal — Oracle Analytics

Oracle Analytics Cloud and Server

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

Syntax on XML Publisher while converting code from crystal

Received Response
51
Views
4
Comments

Summary

Syntax on XML Publisher while converting code from crystal

Content

hello

below is the crystal report code. i want to convert this code to XML publisher. Can someone help me

StringVar CityStateSpacer;

if {APY2021.CITY.A} = "" Or {APY2021.STATE.A} = "" then

   CityStateSpacer := " "

else

   CityStateSpacer := ", ";

   TrimRight ({APY2021.CITY.A})+CityStateSpacer+{APY2021.STATE.A}+"  "+{APY2021.POSTAL.A}

i tried Choose syntax, its not working

<?choose:?><?when:A.CITY=''?><?xdoxslt:set_variable($_XDOCTX, ‘Test’,123)?><?end when?><?otherwise:><?xdoxslt:set_variable($_XDOCTX, ‘Test’,999)?><?end otherwise?><?end choose?>

Answers

  • Jim Mcdonald
    Jim Mcdonald Rank 3 - Community Apprentice

    Is the question mark missing in the "otherwise" case in your template? It should be <?otherwise:?>.

  • Jim Mcdonald
    Jim Mcdonald Rank 3 - Community Apprentice

    xdoxslt and xdofx cannot be mixed.

  • Vsilvery
    Vsilvery Rank 4 - Community Specialist

    I m getting error on below. can you please suggest

    <?xdoxslt:set_variable($_XDOCTX,'descr',xdofx:upper(D.DESCR))?>

    i assumption that we can mix xslt and xdo function

  • Vsilvery
    Vsilvery Rank 4 - Community Specialist

    Thanks. its working