Archive for the 'Tips' Category
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.
There are three ways to move/size individual objects in Crystal Reports.
1) Dragging with the mouse. To move an object you drag the object by its middle. To size the object you drag the sizing handles on the sides or corners.
2) Using the “Size and Position” property available through the right-click menu. You can enter or change the coordinates for the position of the upper left corner as well as the height and width.
3) This one is lesser known. You can click on an object and move it by holding down the CTRL key and clicking one of the four arrow keys. What you are moving is the upper left corner, but since the size of the object isn’t changing you are really moving the whole object. To size the object you hold the SHIFT key instead and use the same four arrows. This moves the lower right corner of the object without moving the upper left corner, thus changing the size.
But there are two limitations to be aware of when using this technque:
1) If the object’s right side or bottom has touched a guideline and ‘attached’ itself, the SHIFT-Arrow will no longer change the object’s size. You can, however, still move the object with the CTRL-Arrow.
2) If you select more than one object, AND you are in preview mode, AND you hold down the arrow key to move the objects continuously, then Crystal Reports will almost always crash. Thanks to Gordon Portanier of Crystalize in Canada for pointing this latest behavior out.
If you want to use the Euro symbol in your reports then you need to do two things.
1) Know the code for the symbol
2)Use a font that includes that symbol.
The code for the Euro symbol in most standard fonts is Alt-0128. Hold your “ALT” key and type the numbers 0128 on your keyboard’s numeric keypad. The Euro symbol should appear. If another symbol appears you may have to change the font for that character to one that has the Euro symbol (like Arial or Times New Roman).
For more about using currency symbols in reports you can read this newsletter article.
For more about the Euro symbol and fonts you can read Microsoft’s kb article.
I have used Crystal Reports with Xbase (Dbase/Foxpro/Clipper) files for years, primarily with Goldmine. Goldmine is a contact manager and stores files in DBF format. With just about every Crystal upgrade I have had to change the way I make the connection to the DBF files. So I was surprised a few months back when CR 2008 (version 12) cleanly ran all of my internal reports with no changes. It Continue Reading »
CR 2008 Service Pack 0 breaks Xbase Connector
I was recently asked to solve another problem with a cascading parameter. Apparently two fields in the cascade had the same field name (but were from different tables). This isn’t unusual when you have several tables with fields named “Description” or “Code”. But in a cascade each level may need to create a separate parameter, and each parameter is named after the field that provides its data. So when CR finds a duplicate field name in the cascade it tries to create a duplicate parameter name and this generates an error. There is no visible option for renaming either parameter.
The solution Continue Reading »
Cascading parameters when two fields have the same name
This one is hard to understand or even describe without an example but here is the general description: A three-level cascading parameter will work fine as long as all of the values in level 2 are unique. However if any values in level 2 can be found in more than one top level group, then you will likely lose values in level 3. Like I said, an example is needed. Say you used the following 8 records to create a three-level cascade for Vendor, Category and Model:
Dell / Notebook / Model_A
Dell / Notebook / Model_B
Dell / Desktop / Model_1
Dell / Desktop / Model_2
Compaq / Notebook / Model_X
Compaq / Notebook / Model_Y
Compaq / Desktop / Model_8
Compaq / Desktop / Model_9
Continue Reading »
Three-level cascading parameter that duplicates/drops values





