Archive for December, 2014
If you make a mistake in a Crystal Reports formula, the error messages are usually pretty helpful. But every once in a while the error can send you on a wild goose chase. The message above is a good example. It will appear when you have an opening paren without a closing paren. But it will also appear in the following formula, even when the parens match:
then (Save1 := 0; Save02 := 0; Save03 := 0)
Now in this formula it is obvious that the parens are not the problem. So why would the error message mention a missing paren? This happens only when you have a specific combination of factors – a Continue Reading »
The ) is missing ?!?
I recently had a report grouped by Employee with one page per employee. Each Employee showed up in the group tree on the left of the screen. But every time we clicked on an employee in the group tree, we ended up on the page of the employee just BEFORE the one we wanted. I thought it was a glitch to I changed the group options, then closed the report and eventually closed CR completely. The problem didn’t go away so I realized it was something in the report.
After some experiments I realized what was going on. The report was printing one page per employee and printing only the group footer. But there was no actual “new page after” checked for the group footer. There was one employee per page only because the group footer was so large that only one group footer could fit on a page. So it mimicked a page break.
But the group tree doesn’t take you to the group footer of the group, it takes you to the Group Header. And in this report the Group Header for each employee was suppressed. So as soon as each Group Footer finished on a page, the next Group Header would start right below it. And because it was suppressed, it would always fit on the prior page.
So the Group Tree took us to this (invisible) Group Header which was always on the page before the corresponding group footer. All we had to do to solve the problem was check “new page after” for the Group Footer and that moved the (invisible) Group Header to the next page, right above the corresponding Group Footer. And then the Group Tree worked as expected.
Are you having trouble with your parameter windows in Crystal Reports? Did your calendar control stop working? Are the “OK” and “Cancel” buttons not responding?
I just got a note from Adam Butt of APB Reports in Trondheim, Norway. Apparently he was experiencing these problems and worked for hours to try and solve it. He went as far as uninstalling and reinstalling his entire CR product suite, including several versions. Only when that didn’t work did he realize that he had recently changed his Internet Explorer Security setting to “High”. Changing it back to “Medium High” resolved the problem. I will have to do some testing to see which of the underlying IE security settings breaks CR parameters. But I am posting this now for others who might run into this problem, or a similar problem, with parameters.
A few years a back I posted a formula for converting a decimal value into a fraction. But the output used full size characters combined with a slash. Recently a customer wanted me to shrink the fraction so it would look like a true fraction.
At first I started looking for super script and subscript characters. Then I found that several fonts have several common fractions as a single character. For instance the Unicode value CHRW(8541) is the character for the fraction symbol “5/8” in several fonts. I found single-character symbols for the 15 most common fractions – those that have a denominator of 2,3,4,5,6 or 8. The formula below will tap into these characters for the corresponding decimal values. I then extended it to include the eight odd numerators over 16. These I created with other special characters that seem to be designed for creating fractions.
But there are several things you have to keep in mind with this technique:
You have to decide how Continue Reading »
Printing ‘single-character’ fractions