Archive for April, 2018



Using a “display string” turns off HTML interpretation

Sunday 29 April 2018 @ 11:59 pm

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.




No current Crystal Reports certifications

Monday 23 April 2018 @ 11:15 pm

I have never been a fan of the SAP certifications for Crystal Reports. But if you were looking to be certified in the near future, it looks like there isn’t currently an option. I read this comment in an SAP discussion on certifications:

“Exam C_BOCR_13 [for CR 2013) is retired and no longer available and we do not have any information on an updated version.”

Once an exam is retired you can no longer take it. And if there is no ‘updated version’ then there is no way to take an exam for CR 2016, at least not through SAP. If anyone hears about an updated exam, let me know and I will update this article.




Formula to group into 2-month periods.

Saturday 14 April 2018 @ 11:06 pm

A customer asked me to group the records in a report into 2-month periods. It sounded simple but there were questions to clarify, like:

Should the 2-month period start on the even months or the odd months?
Do you label the period based on the beginning of the period or the end?

This customer decided to have six 2-month periods in each year, with the label showing the beginning date of each period. The following formula will do that if you substitute your date field in the first line:

Local DateVar x := Date ({Your.DateField});
x:= x - Day(x) +1;
x:=
If Remainder (Month(x) ,2) = 0// 0 starts periods with odd months, 1 starts with even months
then Date(DateAdd('m',-1,x)) // Outputs date at beginning of period
else x;

As it is written, this formula will create 2-month periods for Jan-Feb, Mar-April, May-June, etc. Changing the zero at the end of line four to a one will cause each period to start with an even month instead of an odd month, so the periods will be Feb-Mar, Apr-May … Dec-Jan. I expect most people will want to start with odd months so that you don’t have periods that are part of two different years.

In the example above the date returned by the formula is the first day of the period. If you prefer to return the last day of the period you can add the following additional line at the bottom:

Date(DateAdd('m',2,x)) -1 // Changes output to date at end of period




New SQL Server OLEDB provider supports TLS 1.2

Saturday 7 April 2018 @ 4:30 pm

If your organization handles sensitive information on the web (Credit Card info, HealthCare info, etc) you are probably using the latest TLS protocol (1.2). And if you are connecting to MS SQL Server through OLEDB, you may have had trouble connecting recently. This is because the SQLOLEDB provider and the SQL Server ODBC driver are no longer supported in TLS 1.2.

At the end of March, Microsoft released a new OLEDB Driver (MSOLEDBSQL) that does support TLS 1.2.

Thanks to Lyle Hardin of Foslyn LLC for sharing this info and links.





Recrystallize Pro