phone: (540)338-0194
email: ken@kenhamady.com


Individual Instruction by Ken Hamady

The Crystal Reports Underground News - May 2002
an independent source for Crystal Reports Information
by Ken Hamady, MS


Contents for May:

** A new report viewer for only $35
** A new "Hot Fix" for Crystal v8.5
** Crystal presents evidence in lawsuit against Actuate
** Expert on-site training or consulting
** Using PeachTree UFL functions for Crystal Reports
** Public classes in Leesburg, Baltimore and Philadelphia
** Formula for adding a specific number of business days to a date
** Formula for finding the last Friday (or any day) of month
** My Quick Reference to Crystal Reports in Visual Basic
** Read back issues at http://www.kenhamady.com/news.html

A Special Deal on a New Report Viewer - CRW Reporting:

In past issues I have discussed several viewers which let you run reports without installing Crystal.  In April, Tatum Consulting released a new viewer called CRW Reporting, and they are giving my readers an exclusive price of $35, at least 30% below the other viewers I have written about.  The CRW Reporting viewer is simple to use and allows you to run, print and export your Crystal Reports without having the Crystal Reports program installed. 

CRW Reporting comes in two versions: Standard and Professional.   Standard is as simple as it gets.  You browse to the report and preview, print or export it.  If your reports require a user name and password, the viewer will allow you to enter them once, and will retain them for your entire reporting session.  The Standard version is only $35 if you use the link above.

The professional version adds an administrative database which allows you to control access to groups of reports by defining users and passwords.  For $65 you can install it on three machines, and for $300 you can install it on 10 machines.  The Professional version requires a bit of initial configuration (users, folders, etc) but once configured it works like a champ. 


A new "Hot Fix" for Crystal v8.5:

In my December newsletter I mentioned a "Hot Fix" that you could use to solve some isolated problems.  I listed the more common problems that were solved, and gave a link to the file. 

Now there is a newer "Hot Fix" that solves additional problems, including one problem created by a previous patch.  A sampling of the fixes is listed below.  If you have experienced any of these issues you should consider testing the new "Hot Fix".  Just make sure that you read the warnings and disclaimers first.  The zip file that you download contains a full description of the items fixed.

Partial list of items fixed:
Charts of running totals give incorrect information
Running totals and variables are reset by "zero depth" sections
"Total Page Count" is incorrect when placed in a text object that "Can Grow"
Multi-column reports extend beyond the bottom of the page
RTF Text interpretation truncates data or has formatting errors
System errors occur when a report containing a subreport is changed to landscape
"Use Indexes for Speed" causes application errors
Page size errors occur when "Suppress Blank Section" is used in a subreport
System errors occur when you change the line height in a "Free Form" section
Memory full errors occur with certain variable formulas or during page changes
DHTML exporting and the DHTML viewer generate various errors
Cross-tabs exported to Excel lose column headings
Suppressed columns/rows in a Crosstab reappear in Excel Export
Very wide reports get distorted when exported to Excel
RTF and PDF export images are of poor quality

The "Hot Fix" and full list of issues can be downloaded at the link below:

http://support.crystaldecisions.com/communityCS/FilesAndUpdates/cr85main.zip.asp


Crystal Presents Evidence in Lawsuit Against Actuate:

Some of you know that Crystal Decisions has filed a false advertising lawsuit against Actuate.  I mentioned this in my March Newsletter.  In Early April, Crystal Decisions presented their evidence in the case, and it is now in the hands of the judge.  If you are interested, you can read the following document that gives a description of the case made by Crystal Decisions.

http://intelligence.crystaldecisions.com/downloads/actuate_legal_april02.doc


Expert On-Site Training or Consulting:

I have personally taught over 1300 satisfied students in more than 30 states.  Training on location is my specialty, and I charge about half of the "List Price" for Crystal Training. 

Do I know my stuff?  Check out the Crystal Reports Forum at Tek-Tips.com and you will find me listed as the top Crystal Reports expert out of over 23,000 members:

   http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/100/pid/149

Can I teach?  Many students say that my classes are among the best technical classes they have taken.  Ask to speak to a recent customer as a reference.  Call for more information at (540) 338-0194.


PeachTree UFL functions for Crystal Reports

There are 2 custom Crystal functions that come with PeachTree Accounting and these cause quite a bit of confusion for Crystal users.  The functions are contained in a file that comes with PeachTree called u2lPeach.dll and they are:
   GetPeachCustomFieldHeading()
   GetPeachRowAmount(). 

First muddle - how do you get the functions?
PeachTree sells an OEM version of CR called "Crystal Reports for PeachTree" (CR4PT).  The PeachTree help file states that CR4PT is "designed to work with Peachtree", but I found nothing in CR4PT that was in any way different from off the shelf Crystal Reports, except the name.  There is no mention of PeachTree anywhere in the program files or in the documentation.  The PeachTree functions I mentioned above, and the minimal help for creating reports from PeachTree data, are not in CR4PT, but are part of PeachTree Accounting itself.  I could find no reason to buy CR4PT if you already own a copy of Crystal Reports.  If you don't have CR, the cost of CR4PT is lower than regular Crystal Reports, but CR4PT is an OEM license.  This means that you are only licensed to use CR4PT to read PeachTree data files.  If you use it to read other data, and nothing in the program actually prevents this, you are technically in violation of the OEM license.

Second muddle -what do you do with these functions? 
Even within PeachTree help, there is only a brief explanation of what these special functions do, and nothing that clearly explains how you would use them.  I am an expert in CR, and have a degree in accounting, and I couldn't make sense of how these functions were supposed to be used.  It took a call to PeachTree tech support to get a clear explanation of these functions.  The free tech support doesn't cover Crystal Reports, so I was expected to pay for getting this answer.  Here is what each function does.

Using GetPeachCustomFieldHeading()
Peachtree allows you to define 25 custom fields, 5 each in 5 different modules (AR, AP, PR, Inventory, Jobs).  You not only can store your specified data in these fields, but you can also store your own 'heading' or field name.  Now, the heading that you store doesn't actually change the field name, so when you create a Crystal Report you won't see your custom name.  If you design reports for multiple companies, you would have to change the report to reflect each company's custom headings.  By using the GetPeachCustomFieldHeading() function in a formula, you can have the report print the custom heading for each field.

To use this function you create a formula for each custom heading you want to display. You add the function to the formula, and change only the two numeric arguments at the end of the the function.  To specify your module you put the module number into the first numeric argument (AR=1 AP=2 PR=3 Inventory=6 Jobs=7).  To specify which of the 5 custom headings you want from that module, you give the second numeric argument a number from 0 to 4 (0 represents heading 1, etc).  So to get the FIRST custom field heading from the PAYROLL module, you would use the following formula:

GetPeachCustomFieldHeading ({Company.CompanySpecial1a}, {Company.CompanySpecial1b},
{Company.CompanySpecial1c}, {Company.CompanySpecial1d}, 3, 0 )


Using GetPeachRowAmount():
This function is used when you need an accurate Inventory Cost or COGS for a JrnlRow record.  This function looks very complicated, but you never change any of the arguments.  You simply double click the function and it puts in all of the correct information.  As long as your report includes the tables named Company and JrnlRow, the formula will give you the correct inventory cost for each JrnlRow record.  I can't tell you exactly how it works, but it appears to take into account your inventory cost method, the date of the order, and if your company uses  cash or accrual accounting.  The example below is from PTv9 (2002).  Prior versions used a different AMOUNT argument, and using the wrong version can cause your program to crash. 

GetPeachRowAmount ({Company.CompanySpecial1a}, {Company.CompanySpecial1b}, {Company.CompanySpecial1c}, {Company.CompanySpecial1d}, {JrnlRow.RowType}, {JrnlRow.Amount}, {JrnlRow.Journal}, {JrnlRow.PostOrder}, {JrnlRow.RowNumber}, {JrnlRow.RowDate}, {JrnlRow.ItemRecordNumber}, {Company.IsCashBasis})


Don't just take a class, learn from a Crystal Expert:

Click the "Public Classes" link above for Dates.
Each class is $675 per student.
Or, call for more information at (540) 338-0194.


New formulas added to my web site this month:

I have added two new formulas this past month that you might find helpful.  The links below provide the formula and instructions for putting the formula into your report.

Adding a specific number of Business days to a date:
   http://www.kenhamady.com/form17.html

Finding the last Friday (or any day) of a month:
   http://www.kenhamady.com/form19.html


VB Quick Reference Guide:

If you plan on incorporating Crystal Reports into a VB application, you should get my Quick Reference Guide.  It gives an overview of the integration methods, with syntax examples for the most important commands.  It comes with some source code examples, including a sample report viewer.  It is only $16 and can be Emailed to you within 24 hours.  Follow the link below for more details:  

    http://www.kenhamady.com/vbref.html
 

Contact Information:

Ken Hamady, MS
525K East Market St.  PMB 299
Leesburg, VA 20176
(540) 338-0194
ken@kenhamady.com
http://www.kenhamady.com


Copyright 2002 by Ken Hamady
All rights reserved - Republishing this material requires written permission