Archive for December, 2008



Ranking based on a ratio

Tuesday 30 December 2008 @ 11:32 pm

I recently reread a newsletter article I wrote a few years back and was reminded of a trick that I had forgotten. The article was about ranking groups using a formula that contains summary functions. It is simple to summarize most formulas in a report (sum, count, maximum, etc). And once you have a summary field it is usually a simple matter to use that summary field to rank the groups. Crystal calls this a Group Sort (or a TopN in older versions).

The challenge comes if the formula itself contains a summary operation. Then Crystal will not let you do a summary of that formula, and then there is no way to rank the groups based on that formula. However the article I wrote points out two very important exceptions to this rule:  You can do a summary of these formulas either inside a cross-tab or inside a chart.

So take a common formula that calculates a profit margin percentage: Continue Reading »
Ranking based on a ratio




Shared Variables from a “suppressed” subreport

Wednesday 17 December 2008 @ 12:31 pm

A few years back I wrote about the Stealth Subreport. This is a subreport that doesn’t appear on the report but does run in the backround, providing shared variables to the main report. One of the limitations I listed at the time was the need to have a visible section that occurs at the same frequency as the subreport so that it can be hidden ‘behind’ something. In other words you couldn’t have a suppressed subreport at the detail level but have it still run and generate shared variables for use in the Group Footer or Report footer.

But I just learned that this limitation goes away with v9 of Crystal Reports. For versions 9 and later there is a method that allows you to truly have a suppressed subreport that is run invisibly in the background. It stems from a new feature introduced with version 9 called “Suppress blank Subreport”. Normally this used in combination with “Suppress blank Section” to hide a subreport that doesn’t find any data

What I didn’t realize till this month is that “blank” can also mean a subreport that has all of its sections hidden or suppressed. So even if there is data, as long as there is no visible output the subreport is considered blank and will be suppressed. I also didn’t realize that using these properties to suppress the subreport does not prevent the subreport from running. Normally suppressing a subreport means that it won’t run. But apparently these blank subreports are run before Crystal determines that they are blank, so there is time to actually store and capture their shared variables.

Thanks to Phyllis Swenson of CFI who pointed this method out to me.




More label printer problems

Friday 12 December 2008 @ 12:20 pm

I recently posted a problem that I found with printing labels from Crystal Reports. This month I get a note from a software company that has done quite a bit of testing and is convinced that this is a bug with Crystal Reports. Here is his note. If anyone else has anything to add, let me know. (The comments in the original post also provide some  workarounds.)

———————————————————-

Hello guys,

We are experiencing the same issue on both a zebra label and a Cognitive Advantage DLX printer on printing to a 2.3 x 1″ label.

We also found that printing on a 4×6 label, that the rotation does NOT happen but on random label sizes around the 2.3×1 label, it will indeed incorrectly rotate. I have been on the phone with the cognitive driver developers for a week and we have both agreed that the issue is a crystal reports issue in both XI and 2008 also in XP, Vista home, business, and ultimate editions of both 32-bit and 64-bit.

No matter what settings I set this to, any configuration of size, orientation, etc will not allow me to print a label correctly.

Like I said, using both of these printers, I can print the 4×6 label PERFECTLY, but on the 2.3×1.. it rotates 90 degrees.

I would like to help out as much as possible in this as we are a software company and have done extensive testing in this issue as well has have made high level contact at our distributor and the cognitive manufacturer as well. Please keep me updated on any advancements you guys make on this and I will do the same.. Any ideas how we can proceed to file a bug with Business Objects?

Thanks,
Benjamin Seidler, President
Stimulus Retail Solutions, Inc.

————————————

Update 10/15/2009

SAP claims to fix this issue in SP2:

(Update 6/25/2011)

I have heard that Seagull Scientific provides free printer drivers for many zebra printers.  These do not seem to have the problems described here.  So that is another potential solution.




Bug with multi-page cross-tabs and global variables

Thursday 4 December 2008 @ 12:40 am

Some of you may have played with a technique that I have written about in the past. It is where you use a variable to create running totals within a cross-tab. These running total values can then be used within the cross-tab or even outside the cross-tab.

But I recently heard from a user who was having trouble whenever the cross-tab went over a page break. His variables would reset to zero on the new page and he thought it might be a bug in v10. So I did some testing and found that this behavior occurs in all versions, right up to CR 2008. Whenever a cross-tab goes over a page break it resets any variables it is using, even though the variable is global. The reset goes back to the value of the variable at the beginning of the split section. Usually this means a reset to zero. However in cases where the variable already has a value before the cross-tab section starts, it resets to that value.

There must be a bug or design flaw in the way the split pieces of a cross-tab are processed. Unfortunately, I could find no way to prevent the reset.

Thanks to Peter Lapic for pointing out this bug to me.




Jeff-Net

Recrystallize Pro

The Expert Series