Follow Me on BlueSky 
 


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


Individual Instruction by Ken Hamady

The Crystal Reports Underground News Volume 2010.05


an independent source for Crystal Reports Information
by Ken Hamady, MS 

Contents for May 2010:
** Server Based Scheduling Engines
** Advertising on Ken Hamady.com
** Placing a group of fields onto the report in a column
** Setting a Crystal Report to Any Datasource
** Learn Crystal Reports (without needing a bailout)
** Crystal Reports and barcodes
** My library of Crystal Reports materials
** The history of Crystal Reports SDKs
** Dynamic images in .NET applications


Server Based Scheduling Engines

In my March newsletter I did a review of scheduling tools for Crystal Reports.  These tools allow you to automatically run a report, export it to a file and deliver it to an Email InBox at a set time every day or week.  This months review is also for scheduling tools, but while the last list was desktop-based schedulers, this list is server based schedulers.

Most people who need to schedule reports will be fine using a desktop scheduler, even if they have to deliver reports to many recipients.  You can read my previous blog post for a comparison of desktop schedulers. But in some environments there will be many people scheduling reports and in those cases it might make sense to upgrade to a server-based scheduler.  My newest blog post compares the server-based tools, providing you with their core features and prices so that you can narrow down your search.

The tools being compared are:
    Navarre Report Scheduler by PCS Programming
    cView SERVER by Chelsea Technologies
    Ps Report Scheduler by Perryman Software
    Universal Report Server by VersaReports
    Report Runner Batch Enterprise by Jeff-Net
    CRD Premium Edition by ChristianSteven Software

You can read a brief rundown of what each product does on my BLOG.  You can also download a feature comparison matrix (PDF) that shows some of the specifics, including prices and the install base.  And, with so many complex features I decided to also write a feature glossary to define some of the key features so the comparisons were clearer. What has emerged is a short course in Crystal Reports scheduling technology.

If you have tried one of these products, or are currently using one,  I would love to ask you a few questions – on or off the record.


Advertising on Ken Hamady.com

I have decided to sell some ad space on some of my more popular pages. There is a flat monthly fee for each group of pages, based on their visitor history. So if you have a product that you would like to promote to my visitors, give me a call. 


Placing a group of fields onto the report in a column

In a recent report I needed to place 54 formula fields onto the layout in 3 columns of 18 fields each. I selected the first 18 fields in the field explorer and clicked in the upper left corner of the section. Crystal then put five fields across until it hit the right margin, and then it wrapped the rest to the second line, then the third line until it had put all 18 fields onto the report.  I then had to drag them into a column layout manually.

When I went to do the second column I dragged the 18 fields to the middle of the page.  Again CR went from where I clicked to the right edge and wrapped to add additional rows.  But, what surprised me was that the wrapped rows didn't go all the way back to the left edge.  They wrapped back to the middle of the page where I had clicked.  That gave me an idea.  I hit undo and this time dragged the same 18 fields to the right side of the section.  Now Crystal could only fit one field in each row before having to wrap.  So I ended up with a perfectly left aligned, evenly spaced column with 18 rows and 1 field in each row.  All that was left was sliding the entire column into position.

So I opened up v8.5 and found that it did the exact same thing.  Just goes to show that I learn new things all the time.


Setting a Crystal Report to any datasource

It is usually pretty straightforward to move a report from one database to another.  You simply use the "Set Location" feature in the database menu.  However this can be a challenge when the table configuration is different like when you are trying to set the location of the report from several tables to a single command, view or stored procedure.

The difficulty is that the set location feature was designed to keep all fields within their original table groupings.  This means that if you are using 5 fields from table X, and you want to set the location of 3 of them to table Y, you won't be able to set the location of the remaining 2 to table Z.  This restriction has always puzzled me.  The "set location" process is sophisticated enough to allow you to map a field to a different field name and even a different data type, but for some reason not to a different table.

So I was a excited to see an article on the SAP website that shows a method for solving this problem.  Initially I was disappointed at the solution, which suggests that you take every field you are going to use in the report and write a corresponding formula for that field.  You use the formulas instead of the fields themselves.   That way you can change your datasource and 'map' the fields to any table, simply by changing the formulas.  Seemed impractical at first so I filed it away.

But Mike Adel of Kaiser Permanente thought it sounded promising and asked me about it, so I decided to give it more thought.  I realized that I was already doing this whenever I start reports with specifications that  "evolve" over time.  I identify all the fields that will get heavily used in the formulas and placed them each in their own formula. Then I use those formulas for grouping, calculations, etc.  That way when the specification changes, it is an easy fix to change the fields used.  I guess that post is just taking the idea to it's logical conclusion.

So if your environment is going to be fluid, or if you want to create a report that can run in many different environments, then this is a viable method.  But if you are in a stable environment I am not sure if I would take the time to do this for every report.


Learn Crystal Reports (without needing a bailout)

Even with budgets tight there is no need to miss out on Crystal Reports training. You still need information to do your job, so stop struggling with Crystal Reports and learn what it can do. The most cost-effective way to be taught Crystal Reports is in my individual training program.  It is ideal for people who:

   Can't take 2 days off for a regular class.
   Want to learn in their own database.
   Need to cover only a few topics
   Want to learn from someone who has taught 2,500 satisfied students.

Remember, the cost of a typical 2-day Crystal class is enough to buy 7 hours of individual instruction time with me.  And this is one-on-one, hands-on training - not a webinar. Start with a purchase of only 2 hours and get my course material with exercises for free.  Do as much of the work as you want on your own, then use your prepaid time to work with me by phone and shared desktop.  I can review lessons, answer questions, troubleshoot or even help you create reports.  For more details see the "Individual Training" page on my web site.

Or, if you want to schedule a class at your office, using your data, I can save you money there as well.  Along with myself I have discovered some top-notch instructors all over the US, UK and Canada. All of us can deliver a class at a very competitive price.  Call for more details.


Crystal Reports and barcodes

Bar Codes are everywhere. The UPC code you see at the store is just one example.  Every consumer product is assigned an ID number by the Uniform Code Council in Dayton, OH.  That number is converted into machine readable form so it can be quickly scanned at checkout.  But you now see scanners to check materials out of inventory; patients within some hospitals; even my local library uses a scanner when checking books in and out.

You can even use Crystal Reports to print barcodes on forms or adhesive labels. In most versions of CR you need to write a formula to convert your number into a string. Then you need to install a barcode font that can print the actual bars.  Crystal Reports 2008 comes with a simple bar-code font built in.  You can just right click on a field and convert it to a barcode.  This font is provided by Azalea Software, Inc.

If you are using a version of Crystal Reports that does not come with bar code fonts you can chose between several commercial or free bar-code options.  There are three primary commercial sources for bar code fonts that work with Crystal Reports: Azalea, Wasp, and ID Automation.  Azalea is the most expensive because each font seems to be sold individually.  The other two vendors sell sets of Fonts and font formats.  Each vendor provides the appropriate formula functions for their fonts.

ID Automation offers one commonly used font for free to small companies or non-profits (see the "free" link on the left of their page).  You can contact them for more information.  Or you can use a free barcode font released under the GPL/GNU (open source) license.  It is an EAN13 font which is the parent of the UPC-A barcode you see on your box of Corn Flakes.

If you need to use a more advanced barcode like a "2-D" font (a square of pixels rather than bars) then you will need to use a commercial font.  For links to the commercial font vendors and other useful barcode-related links, see the LINKS page of my site.


My complete library of Crystal Reports materials

Do you struggle with subreports?  Are you curious about cross-tabs? Why not let me explain these Crystal Topics to you with one of my Expert's Guides.  Each guide comes with clear explanations and sample files to illustrate the concepts.

    Expert's Guide to Formulas  ($36)
    Expert's Guide to Subreports, Parameters and Alerts ($28)
    Expert's Guide to SQL Expressions, Options and Commands ($26)
    Expert's Guide to Totals ($24)
    Expert's Guide to Cross-Tabs ($22)
    Expert Techniques Vol. 1 - 4  ($19 each)
    Quick Reference to Crystal Reports in Visual Basic ($16)
    Quick Reference to Crystal Reports in .NET ($14)

You will find these on the LIBRARY page of my site.

 


The history of Crystal Reports SDKs by version

There is a handy grid in a blog post by Ludek Uher of SAP.  It shows all the different SDKs and which versions of Crystal Reports supported them.  So if you have to upgrade a Crystal related application, and you want to know how far forward you can go and keep using the same SDK, then this grid should help.  Users have suggested that Ludek create some similar grids for other features.  If he does then this link will be even more helpful.


Trouble with dynamic images in .NET applications

Dynamic images are a great feature of versions 11 and 12 of CR.  They work pretty well and are mostly trouble free, as long as you are within the report designer.  But let's say you try to run one of these report from an application, in something like VB or .NET. You might find that everything works fine except for the dynamic images.  I know a developer who ran into this problem last month and only solved it by opening a support ticket with SAP.

What she discovered was that she was not alone.  SAP has written an article explaining the problems developers face with dynamic images.  The article is also by Ludek Uher and is called: Crystal Report Viewers in Visual Studio .NET – Dynamic Images.  Anyone else who runs into this might want to read this article before you call support.

Also, make sure you are not using on the Crystal Reports runtime files provided with Visual Studio.  These are from an older CR version (v10.x) which does not support the new dynamic image feature.  You will need to own either CRv11 Developer Edition or CRv12 (there is only one edition of v12).  Using one of these gives you the license to the latest runtime files, which are needed to incorporate dynamic images.  The v10 engine will run v12 reports fine in all other aspects, but your dynamic image will be replaced by the red 'x' when the report is run.

And, if you have installed multiple versions of Crystal and/or .Net you may create a conflict between the DLLs of an existing project.  To resolve this, create a new project in .Net, add a Crystal viewer and bind the viewer directly to the report.  If the images appear you can rebuild your application in the new project.

And if you are new to running reports from .NET you might want to get my Quick Reference to Crystal Reports in VB.NET.  This small document gives you simple syntax examples for changing the basic report properties at runtime, and for passing connection info, formulas and parameter values.




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 2010 by Ken Hamady
All rights reserved - Republishing this material requires written permission