Tags Inside Translations on Field Names - Ugly in Reports

We have the need to put some html tags inside a column header translation (for example: <a href='www...'>Company Name</a>) because we want this to show up anywhere that field is present (screens, lists, dashboard etc). It works quite well except that the report engine converts the tags to html characters (&lt;) so the whole translation (tags and all) show up in the column header which looks quite ugly.

We managed to fix this in the html report by changing the xsl file to not encode the characters, but the PDF and Excel exports still keep the literal tags. Any ideas if there's a way to modify the way the PDF or export handles this encoding?

  • 0

    Stacy

    I think the easiest way to avoid the problem of HTML tags added to column name translations displaying in reports is to.... not add translations to column names. :-)

    The practice of adding HTML and script to translations is frowned upon by my support colleagues. And I know that I am just as guilty as anyone for using this technique to get code added into hard to reach places.

    This by the way is changed in Sage CRM 7.2 as it becomes very easy to add client side code into any screen you need using the custom script library features.

    But going back to your problem, the technique that I use is to side step the issue. I typically add a new aliased column into the view used by the reports. So if XXXX_myfield is the one with the translation added then I alias it in the report view as "xxxx_myfield as xxxx_myreportfield".

    No need to fiddle around with additional code or xsl files to remove the offending characters.

    Does that make sense?