A customer was deploying my calendar report for multi-day events when he noticed an issue in CR that I had never noticed. This particular calendar report takes advantage of several less commonly used features of CR. It appears that two of those don’t play nicely together:
1) The Display String property (overrides the current value and displays something else)
2) HTML Interpretation (applies any HTML formatting codes found within the field value).
The customer told me that if he tried to change any of the formatting properties he would lose the HTML interpretation. Also, the entire paragraph tab would disappear so that he could not re-activate HTML interpretation. So I did some testing and found the following related to these two properties:
1) Whenever you format an object and add or change the display string formula (“common” tab) Crystal will reset the HTML interpretation property back to ‘none’. It will also no longer show you the “paragraph” tab which prevents you from re-activating HTML interpretation.
2) You can comment out the display string and save it. This brings back the paragraph tab. You can then re-activate HTML interpretation. Finally, you can go back to the Display String formula and take out the comment marks. This will give you both features at the same time.
3) But the next time you then change ANY formatting property (other than adding or deleting the comment marks in the display string) Crystal will again reset the HTML interpretation back to ‘none’. You have to make your formatting changes, save them, then go back in and comment out the display string so you can re-activate the HTML interpretation.
4) If you comment out the display string formula and save it, but then switch to the paragraph tab without clicking the OK to exit the “Format Field” dialogue, the paragraph tab is not only reset but it won’t even display default values. Where you normally see zeros the boxes will be blank. And the radio buttons for “Reading Order” will both be blank. However if you click OK, and then use Format > Field to get back to the paragraph tab, it will show all of the default values.
5) If you select multiple fields, and use “format object” to format them all together, the behaviors described above do not appear. You can still see the ‘paragraph’ tab even after changing the display string. The HTML interpretation doesn’t get reset. Thanks to Guillaume Boucher of W3COM.fr for pointing this out to me. This explains why I was able to develop all 3 calendar report variations and never notice this issue.
Very strange.