Archive for June, 2021



Using HTML interpretation

Wednesday 30 June 2021 @ 2:31 pm

Sometimes database fields store their data with HTML formatting tags. When you put that field on the report it will display the raw HTML tags. However, if you format the field to use “HTML interpretation” Crystal will try to use the HTML tags to format the text. Crystal doesn’t support ALL HTML tags and properties, but there is a list of the ones that are supported on this page.

Another way to use HTML in Crystal is to include HTML tags in your formulas. For instance I could use a few HTML tags to highlight only a portion of a formula field’s output. Below is the formula for a 3-line address with the City name in bold blue text:

{Customer.Customer Name} & '<br>' &
{Customer.Address1} & "<br>" &
"<b><font color='#00559c'>" &
{Customer.City} &
'</font></b>, ' &
{Customer.Region} & ' ' &
{Customer.Postal Code}

The formula uses 4 different tags:

The tag <br> after the first 2 lines creates a new line.
The tags <b> </b> mark the beginning and end of the bold text.
The tags <font color=’#00559c’> </font> mark the beginning and end of the blue text.

You can look up other color code using a color picker site.

When you first put the formula on the report it looks like the left example below. You then use the menu options “Format > Field” and select the “Paragraph” tab to see the “Text Interpretation” option at the bottom. Select “HTML Text” and the formula will look like the right example below.




U2lwin32 recompiled for 64-bit, available to test

Wednesday 23 June 2021 @ 8:31 pm

Last week I invited developers to recompile the source code for this free 32-bit UFL into a 64-bit version of the same DLL.  Today someone sent me a DLL they had compiled and I have posted it on my site.  I consider it a Beta version since he only tested the function he needed (FileAppendLine).  But there are 37 other functions included in the dll. The developer also admitted that “the code still assumes a 32-bit word length”, which might cause problems on some of the functions.

I can’t test it yet since I haven’t upgraded to CR 2020. But if you have CR2020 and want to try some of these functions, you can download and test the DLL.  If you do any testing, let me know which functions you try and if you run into any problems.  And if someone feels like doing a more complete conversion, you can download the source code for the original 32-bit dll.

 




Anyone want to recompile this free dll to be 64-bit?

Friday 18 June 2021 @ 11:03 pm

Last week I mentioned the U2lwin.DLL. It is a Crystal Reports user function library (UFL) that is currently available in 32-bit but not yet in 64-bit. This means that users who have this dll and who upgrade to CR 2020 will lose some of their formula functions.

This week I checked in with the developer, Bjarke Viksoe.  He has always posted the source code for this dll on his web site. He said it is fine if someone else takes the source code and creates a 64-bit version of the dll. He doesn’t even mind hosting the upgraded file if that helps.

Of course, most of my readers are not application programmers, and neither am I. But I know that a few of you write serious code. If anyone wants to take a crack at this you can download the source code and give it a shot. The current source code uses Microsoft Visual C++ 6.0.

In the meantime, if you upgrade to CR 202o, there is another DLL that you can purchase called Cut Light by Millet Software.  It is one the UFLs in my annual comparison of UFLs. Cut light has at least twice as many functions as U2lwin with many that are the same. So it might have the functions you need, and it comes in both 32-bit and 64-bit.  It isn’t free but it also isn’t very expensive.




Transitioning from 32-bit Crystal Reports to Crystal Reports 2020

Monday 14 June 2021 @ 11:53 am

Some of my customers are transitioning from 32-bit versions of Crystal Reports to Crystal Reports 2020, which is 64-bit. This creates some issues since ODBC/OLEDB drivers are either 32-bit or 64-bit. Switching to CR 2020 requires different drivers and (if using ODBC) different ODBC Data Source Name (DSN) entries.

The same applies to UFL function DLL files. For instance the free ufl named u2lwin32.dll only comes in a 32-bit version. Some commercial ones come in both 32-bit and 64-bit editions. Switching to CR 2020 requires that you use 64-bit UFL libraries.

The good news is that RPT files in CR 2020 are backward compatible with earlier versions, probably back to Crystal Reports v9. So you can modify and run a single RPT file in both CR2020 and earlier versions. But you do need different connectivity. What my customers are doing is naming the connections the same in both the 32 and 64 bit environment. That way users in both environments can run the same report without modification.

If you run into any strange behaviors in using CR 2020 or in the transition, please let me know and I will share with others.





Recrystallize Pro