Archive for the 'Method' Category
Traditionally, a CSV file would not be expected to have field or column headings on the first row. But this has been a requirement in a number of environments that I have worked in. Providing this has been a challenge until recently. In most Crystal environment, a CSV export would take every visible object on the page and make it into a column. The last column is often a column of ones, created from the page number in the page footer.
Up through CRvXI release 1 it was possible to get column headings to print as the first row of the CSV export, but it was a complicated process. It involved modifying the report, installing a special driver and even tweaking the registry settings for Crystal Reports. The steps are outlined in knowledge base article c2014451.
If this is a regular requirement in your environment, then you should seriously consider an upgrade to XIr2 or CR 2008 (also known as versions 11.5 and 12). I just noticed that the CSV export in these versions has a new check mark asking if you want to ‘isolate’ the Page Headers. If you check this property the values of the page header become the first row of the CSV export.
Say you have 2 group levels in your report Customer and Product. You have subtotals at the end of each group, so you have 2 levels of subtotals. What do you do if you want to have a page break after each product? Your first attempt would be to simply go into the section expert for GF2 and check “New Page After”. This works fine except for the last product in each Customer. The Customer’s subtotals would end up printing on the top of the next page, which would be a different Customer’s page. So you add Continue Reading »
Cascading page breaks (on Interior Groups)
Crystal will allow you to conditionally suppress a Page Footer. But even when the section is suppressed, the space it would have taken up is still there, reserved as blank space at the bottom of the page. This is because other features like ‘can grow’ and “keep group together” make the job of determining the page size very complex.
There is a related option for page footers called “reserve minimum space” but this only applies Continue Reading »
Conditional Page Footer
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.
When you create a parameter field in Crystal Reports you can create a “pick list” of values so that the user can select a value rather than typing the value. If your pick list is a series of codes you can also add a second column of values to provide a description for each code. So your pick list might look like this:
A - Adjustments
C - Credits
D - Debits
The challenge comes when you want to display the user-selected values on the report. Continue Reading »
Displaying chosen paramater values with descriptions
I have a formula on my site that appends a series of string values from consecutive records and turns them into one long string. But if you are using version 8.5 there is a limit of 256 characters of output for any formula which limits the usefulness of this formula. But Shelly Petersen of Computer Arts, Inc. recently gave me a draft of a variation of my formula that allows v8.5 to get around this limit. It splits the string into several variables that are each under the 256 limit, and then she uses separate formulas to display each variable. She puts all of the formulas together in one large text object to show the long combined string (since text objects don’t have length limits). Here is the main formula: Continue Reading »
Apending Strings in v8.5 into one long string over 256 Chars
One of my customers asked if there was a way to do this. There isn’t a way to do this directly, but I played around and found a way to control the visibility of vertical lines, horizontal lines and boxes. Below are the steps for controlling all lines and boxes located between the Page Header and Page Footer. However the method can be adapted for other locations. Continue Reading »
Suppressing vertical lines on a page, based on a condition.
Many people want to have vertical lines that run through all of the detail records in a report and so they draw lines that cross over the details, going from header to footer. But a problem arises when the details carry over a page break. Lines that cross over the Details section may extend below the last Detail of the page, down to the page footer. This is especially likely to happen when you have a deep Details section. This is because a deep section may not fit at the bottom of the page, leaving a large white space. Lines that cross over the Details section will continue through this space.
The alternative approach is to have the lines contained completely within the Details section. Continue Reading »
Vertical lines hang down too low at the bottom of the page
Indexes in the database normally improve the performance of a report. But I had a situation with a customer this week where the index caused a report to misbehave. The user ran a simple report listing account numbers. The report had no selection criteria. One of the account numbers showed up in two different records. But when he added a selection criteria to select just that one account number, only one of the two records was returned. The account numbers were identical and there were no other report features (like select distinct or group on server) that would affect the number or records returned. He puzzled over it for hours before sending me a copy of the report with saved data.When I added the same criteria at my end (and used the saved data) I got both records. But when I sent it back to him and he clicked “Refresh” he got only one.
That told me the problem wasn’t in the report. Continue Reading »
The index that ate my data





