RPT management utilities for 2021

Friday 30 July 2021 @ 9:39 pm

I have just updated my comparison of RPT management utilities for 2021. These are tools that allow you to scan, document, compare and in some cases batch update RPT files. The list includes 9 tools:

Report Runner Documentor by Jeff-Net
R-Tag Documentation and Search by R-Tag
CR Data Source Updater by R-Tag
Visual CUT and DataLink Viewer by Millet Software
Report Miner by the Retsel Group
Code Search Professional by Find it EZ Software Corp.
Dev Surge 365 by Find it EZ Software Corp.
.rpt Inspector 3 Professional Suite by Software Forces, LLC
.rpt Inspector Online by Software Forces, LLC





Crystal Reports 2016 date formatting issue

Wednesday 21 July 2021 @ 2:29 pm

When you set up Windows you get to select a Regional Format for things like dates and times. For instance, English(US) format will show today’s date as 7/21/2021 while English (UK) will show today’s date as 21/7/2021. In Crystal, certain date objects can be assigned to use these formats, so that they automatically change from one format to another based on the regional format setting of the PC running the report. This is handy if you have users in different countries. To use this feature, right-click on the date field, choose “Format Field” and on the “Date” tab select the “System Default Long/Short Format”.

However, I just had a user complain to me that he couldn’t get CR 2016 date fields to respond to the regional setting. So, I did a quick test in my own environment and found that changing my regional Format from English (United States) to English (United Kingdom) had no effect on date format in CR 2016. I closed Crystal and reopened it, created a brand new simple report and put the print date in the Page Header – and it still showed in US Format. To make sure I was using the right setting I tried the same test in CRv10 and the print date came up in UK format. I repeated the test in CRv8.5 and it also came up in UK format – but not in CR 2016.

I did an online search and found an SAP thread where someone else had the same issue when they upgraded to CR 2016. SAP’s response focused on the database client (?), but the issue didn’t appear to have been resolved.

I wonder if Crystal is somehow pulling the regional format correctly when it is installed, but then isn’t updating the region if it is changed after the install. If anyone is seeing different behavior or has insight to share, please let me know.





Download my advanced course materials

Saturday 10 July 2021 @ 7:50 pm

In April I made my Intro course materials available for free.  I mentioned this in my blog and newsletter and so far several hundred users have downloaded the material. This month I am going to make my Advanced course materials available in the same way.

Just like the Intro material, you are welcome to download the materials and use them. Share them with your friends. Please do not modify them or try to sell them.

Note that as a consultant, people often pay me to help them use or learn Crystal. You can, too. So if you have questions about Crystal Reports I am happy to schedule a short consult for you. This is explained further on these links:

https://kenhamady.com/faq.shtml
https://kenhamady.com/support/default.html





Undocumented limit on the ExtractString() function

Sunday 4 July 2021 @ 4:21 pm

I have written before about using the ExtractString function. This function is found in the “Additional Functions” of Crystal because it comes from a UFL. But this UFL has come with Crystal Reports for a long time.

Today I found out that this function has an undocumented limit -it can return a maximum of 510 characters. If you need to allow for more than that you will have to use an alternative approach. Here is the formula that I used before I discovered the ExtractString() function. It will also work if you need more than 510 characters.

Local stringVar x := {Your.Field};
Local stringVar Beg := "BeginString";
Local stringVar End := "EndString";

Local NumberVar BegPos := Instr(x,Beg );
Local NumberVar EndPos := Instr(x,End );
Local Numbervar BegLen := Length(Beg);

if BegPos > 0 and EndPos > 0 and EndPos > BegPos
then trim(x [ BegPos+BegLen to EndPos-1 ])
else ''

In the first 3 lines you put in the name of the field, and then the two strings that mark the beginning and the end of the string you want to return. You shouldn’t need to modify the other lines.

The formula will then return everything between those two strings but will not include the strings themselves.





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.





Server-based scheduler comparison (2021)

Wednesday 26 May 2021 @ 4:31 pm

I have just updated my comparison of server-based scheduling tools for 2021. These tools are similar to the desktop-based scheduling tools I write about every March, but these are designed to be run on server. This allows multiple people to schedule reports for automated delivery by Email, FTP or network folder.

There are 11 products on the list this year and a few feature updates and price changes. The blog page provides a brief overview of each product. It also has a link to the feature matrix that compares roughly 70 features of these tools. There is even a feature glossary that defines all the terms. So if you need a short course in automating Crystal Reports delivery, this is a pretty good place to start.





The wrong way to design a report

Friday 21 May 2021 @ 11:59 am

Anyone looking to test the limits of Crystal Reports might be interested in the stats for the report I was sent recently. It has over 1,200 Report Footer subsections that covered 30+ pages.  There were 2,200 running totals with conditions and 7,500 formula fields. I have never seen anything like it.

Surprisingly, it ran fine – but making changes to the layout was very slow and sometimes crashed Crystal. The customer wanted me to add two more columns. If I followed the existing model it would have taken another 250 running totals and another 750 formulas.

The reason the numbers were so high came down to an odd choice made by the original developers. They created the 30+ pages using only the Report Footer.  Every visible number is a unique formula or a running total. Each running total has a condition that assigns specific account numbers. There is no grouping even though the report has recurring sections that would lend themselves well to grouping.

I convinced the customer to let me rebuild the report from scratch using grouping. I have already redone 18 pages and needed only 100 formulas an no running totals. The account number mapping that was scattered in thousands of running total conditions is now consolidated into one formula, making the report much easier to maintain.

So, if you have a beast of a report that needs taming you might want to let me have a look.





Next Posts »» «« Previous Posts
Jeff-Net
Recrystallize Pro

Crystal Reports Server