Archive for the 'Tips' Category
All of my students learn how to use the VAL() function, which converts numeric characters into true numerics. The VAL() function works by starting at the left of the string, reading the digits, and stopping when it hits the first alpha character. It then converts the numeric characters it has found into numbers. However, if it finds a dash before it finds an alpha character, it flips the sign of the numeric result to negative and keeps reading the digits.
The problem comes when the dash is among the numeric characters. Continue Reading »
The effect of dashes on the VAL() function
I normally install multiple versions of Crystal Reports on my current machine. This allows me to test reports for clients who may be using older versions of Crystal. Currently I have versions 8.5 through 12 on my Vista laptop and have only had minor problems running them. But as of this week versions 9 and 10 no longer load. I get an error related to keycode.dll. From what I gather I have to uninstall and reinstall these versions to solve the problem, but that means uninstalling 4 versions so that they can be reinstalled in chronological order. Fortunately version 8.5 still works fine and that is the one I use most after version 12. This is because 9-11 are all compatible with v12.
So, I can’t say for sure what caused the change because I haven’t used these versions in a few weeks, but I did get some updates from Microsoft just one day before those versions stopped working. If anyone else has recently seen this error drop me a note. Maybe we can figure out the cause.
I think today was the first time I showed someone a practical use for the Report Explorer. I was shown a PDF export that had a short stray line along the left margin. The line didn’t appear in the preview mode or in the design mode of the report, but I have seen strange things happen with objects. I have seen objects located “below zero” on the design screen (so far left they are off the form), or hidden completely behind layers of other objects. So, I figured the quickest way to find it was to look in the complete list of the objects in each section - the Report Explorer. That way I could Continue Reading »
Using the Report Explorer
I probably use the “Guidelines” feature of Crystal Reports more than most people. Guidelines are the invisible (or visible) lines that project out from those tabs on the rulers. They are similar to “Snap to Grid” in that you can ’snap’ objects to these guidelines to keep rows and columns aligned. You can then slide the tabs to adjust the position of the row or column.
The problem comes when you need an object to be close to a guideline but not attached. As soon as you get close to a guideline Crystal wants to snap the object into place. I just rediscovered today that if you hold down your ALT key while you are dragging an object, then the guidelines are no longer “sticky” and the objects won’t try to snap to them. It is as if the guidelines are temporarily removed. And it works for “Snap to Grid” as well, so you can position objects between the dots if needed.
This feature is only available in versions 10 and later.
I just found a handy link that lists all of the “Free Trial” software available from the Business Objects web site. You can download trials for both CRXI (v11) and CR 2008 (v12), although you do have to register to get the download and key. These are fully functional versions that can be used for 30 days. They can then be converted to full licenses by using a key from purchased software.
Every once in a while I have found that Exporting from Crystal Reports to PDF doesn’t look as good as the printout. In those cases I might not use the Crystal built in Export function, but instead will use one of the free PDF printer drivers that are available. My current favorites are PDF Creator and Cute PDF.
These tools, once installed, behave like a new printer on your computer. You select this faux printer and print the report as you normally would. It converts the output of the report (or document or spreadsheet) into a PDF file. PDF Creator is open source and works with all Microsoft operating systems except for Vista. Cute PDF is free but is not open source. I use it currently on Vista.
To install Cute PDF you must download both the writer and the converter on the left of the page.
Starting with Crystal Reports version 11.5 (also known as XI r2) there are several tool bar buttons that can be made “sticky”. This means you can double click the button to make it stay on until you turn it off. This is especially handy if you are using the Format Painter, because it allows you to format many objects at once, without having to re-click the tool bar button in between.
Continue Reading »
“Sticky” Buttons for the Format Painter and other controls
Last year I published the “Expert’s Guide to SQL Expressions, Options and Commands“, just as CR 12 was coming out. In the Guide I explained the workaround for passing multi-value parameters to SQL Commands. Up until today I had missed a new (but little noticed) feature of CR 12. Commands parameters in CR 12 have a new option that allows multi-value parameters. No workaround needed. And, because you can launch stored procedures from a command object, you can now pass true multi-value parameters directly to your stored procedures.
You will see this feature at the bottom of the window when you add a new parameter to a Command. However, if you are using versions 9 - 11 you will not have this feature.
I was creating a report for a customer that had provided a spreadsheet as a data source and noticed something very odd in the Field Explorer. There was only one table but the field tree had several nodes that could be collapsed and expanded, with several fields in each node. After a bit of searching I found anarticle article on the BO website that describes this behavior. Apparently this feature was added to XI release 2.
If you have a dash in your field names and 2 fields start with the same characters up to the dash then Crystal will put those fields under a node. So if your fields were like this:
Address1-City
Address1-State
Address1-Zip
There would be a node called Address1 with 3 fields below it. Not sure I would have ever thought to add dashes to field names but if you start seeing nodes in your field tree you will at least know why they are there.
The start page in Crystal Reports v11 and v12 is a web page. It pulls up dynamic web content from the Business Objects web servers each time you start the program. If you are not interested in this content or have other reasons not to want Crystal requesting a internet connection, there is a simple method of preventing it. Continue Reading »
Prevent Crystal Reports from requesting an Internet connection at startup.





