CUT Light UFL provides distance calculation

Tuesday 13 September 2011 @ 7:54 am

Millet software has recently added some new features to the CUT Light UFL.  Cut Light is one of several DLLs that you can install to let your Crystal Reports formulas do all sorts of interesting things.  For example you can have formulas that carry a value from one report to another, launch an application, run a batch file or execute a SQL statement.   You can read this page for a more complete list of what they can do, and for more information about CUT Light.

A few months ago Millet Software released version 5.2 of CUT Light with a handful of new features.  The one that got my attention is the ability to calculate distances between 2 zip codes or between a pair of Latitude and Longitude coordinates.  It can even convert zip codes into coordinates(see note below).  The calculated distances are direct surface distances – not driving distances – but I can still think of several uses for this in reports, like sorting locations based on their distance from an input zip code.

If you think up a creative use for this, drop me a line.


Added 9/15/2011:

I just checked the manual and this function converts zip codes into latitude/longitude by doing a web look-up, so it needs web access to work.   You may also find that it stops working at some point, because the web site used may limit the number of requests per day.  My workaround to this limitation was to download a zip code database that includes longitude and latitude and look up the coordinates myself.   No limitations and it goes much faster.  Ido is looking into ways to solve this.  If you want a zip code database that has longitude and latitude coordinates you can try these free sources:

Added 10/26/201

Ido Millet has updated CUT Light  to include a zip code to long./lat. conversion table.   It is data is as of the 2010 census and it is only accurate to the 5 digit zip code, but because it is stored locally it will be more reliable than the web based query, especially for high volumes.

(For examples of my most popular formulas, please visit the FORMULAS page on my website.)

Leave a Reply

Recrystallize Pro