custom html-contents in cells

joerx
2008-10-24
2013-04-29
  • joerx
    joerx
    2008-10-24

    Is there any way to escape the html-tag delimiters (< and >) and prevent them from being rewritten to &lt; and &gt;? We try to display several measures in one cell and then do some conditional formatting, so the MDX should look something like:

    WITH MEMBER Measures.[combine] AS [Measures].[count] || [Measures].[quota] || Iif([Measures].[quota] <0.9,<img src='icon_red.gif'/>,<img src='icon_green.gif'/>)

    Is there any way to do this?

     
    • Ati Rosselet
      Ati Rosselet
      2008-10-24

      well... have you looked at the colors.jsp and arrows.jsp files in the webapp?  I can't recall exactly how they work, in colors.jsp, you can provide a style for the element (here color is specified), maybe you could use a color instead (red,yellow,green)? (or maybe the style could contain a background image? or...)  or.... if you don't need to arrows, replace the images with the red/green images you do need, and use the arrow tags?  (just an idea).

       
      • joerx
        joerx
        2008-10-24

        Thanks for the reply.

        The problem is, that it seems I cannot use the styles or arrows when I try to combine different members in one cell. To what members formatting should I add the style? I already used arrows and cell styles in cells with only one member, and it worked fine.

        If I use the concat-operator (||) between the member, it does not work anymore, so I came up with the idea of appending html directly to the string. In one example for MSSQL-Server I've seen it working. (Somewhere on this page: http://www.scdi.org/~avernet/misc/olap-mdx\)

        Any other suggestions?