howto

How-To: Tutorials and Walkthroughs

Firefox Configuration Tweaks

Most of us can agree that Firefox is pretty much the hottest browser around. It has excellent standards compliance (bested only by Opera) and the richest collection of extensions around. In addition, it provides a level of configurability that we normally only get to dream about; through the page "about:config" you can tweak the behavior of practically everything in the browser. Sometimes programs appear that perform the same sort of task, for example fasterfox whose only purpose is to tweak some of these settings for you.

Crystal Reports: Functions for Aristocrat OASIS

Due to the abject uselessness of Aristocrat's website, there is no way to just look up the information in the tutorial documentation (or anything else.) Thus, I have created this document to list formulas useful in crystal reports for processing OASIS data.

Even if this information were copied verbatim from the tutorial document and placed on the web, it would still contain errors. (See the first example in the Advanced Crystal Reports guidebook from 10/17/02 on page 12.)

Crystal Reports: Gnome Sort

Crystal Reports 9 provides no way to sort an array. If you want to calculate the median value for an array, it must be sorted. On the other hand, it does provide comparisons that work properly based on data type, so that for example ( "Alice" < "Bethany" ) will evaluate true. The following examples are designed to sort numerical arrays but they can as easily sort strings or any other data types in Crystal.

Crystal Reports: Cocktail Sort

Among the many pieces of obvious functionality missing from Crystal is a median function that will operate on an array. The median is not horribly difficult to calculate, but in order to do so you need a sorted list of values. Another obvious thing Crystal is missing is an array sort function. The median of a list is its middle value by position such that of the set (1, 3, 3, 4, 6) the median is 3 while the average is 3.4. While it does not look very useful with a short set of only five elements, it is often useful when you have one or two hundred of them. It is often much more useful than an average when you have a lot of redundancy in your set.

Crystal Reports: Making Sense of Time

Converting a bunch of Seconds to something Useful

A lot of databases store time elapsed as a number of seconds. This is sufficiently granular for most purposes and it is programatically a lot easier than storing day, hour, minute, second and so on values.

When it comes time to introduce a human to that data, the big number of seconds isn't going to mean diddly. Enter the following formula:

Crystal Reports: Calculating the Median Value

Crystal Reports 9 [CR9] allows you to create a median summary field, but not to get the median for an array. Sure, you can get an average, or a mean, but not a median. If you want the median of a list of values, they must first be in order, which is outside the scope of this document (but there are other documents on sorting arrays.)

Pages

Subscribe to RSS - howto