Handy custom functions in a free DLL

Tuesday 21 April 2009 @ 6:58 pm

One of my readers tipped me off to a web site that has a handy Crystal Reports DLL that you can download for free.  This DLL adds several custom functions to your formula editor that allow your formulas to do all sorts of new things (and some I don’t recommend that you try).

There are about 40 functions in the DLL that allow your formulas to interact with the operating system. Here are some examples:

  • Store and retrieve entries in an INI file
  • Check a registry value
  • Check the name of the user logged in to the PC
  • See if a file exists, then either append to that file or delete it.
  • Launch a windows program
  • Play a sound file
  • Copy text from the report to the clipboard

This last one is now in one of my reports and saves me a few keystrokes whenever I have to manually export an invoice.  There is one function that I only mention as a warning – the function that allows you to write a registry value.  That one could be dangerous if used incorrectly or accidentally.

The page mentions Version 9 but the functions seem to be available in all three versions of Crystal that I currently use:  v8.5, v10 and v12.  It also mentions an install script, but all I did was put the DLL in C:\windows\Crystal\ and it was recognized by all three versions.

If some of these functions sound familiar it is because many of them are available in a tool I have written about called Cut Light by Millet Software.  Cut Light Costs $50 but has 2 advantages. First, since Cut Light is a commercial product you can expect more responsive support.  Second Cut Light doesn’t include a “Write to the registry” function which eliminates some of the risk.  You can find a link to Cut Light on my LINKS page.  And don’t forget to request a free review of my favorite tools using the autoresponder email on that page.

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

Leave a Reply

Recrystallize Pro

Crystal Reports Server