Archive for May, 2016



Crystal Reports 2016 is being sold?

Sunday 29 May 2016 @ 1:28 pm

I just purchased CR 2016, but it might just be a fluke of the SAP store.

One of my customers needs to buy a new copy of Crystal Reports. They asked if the should buy CR 2013 or CR 2016. I told them that CR 2016 was not yet released and they said it was listed in the SAP store. So I went to the Crystal Reports product page and hit “buy SAP Crystal Reports”. It took me to CR 2013. But then I clicked the product name to see the store listing for CR 2013. and on that page, in the list of “Other Versions” of the product, was a link to “SAP Crystal Reports 2016“. That link allowed me to put Crystal Reports 2016 into my cart and purchase it.

I already have CR 2008 so I purchased the upgrade to CR 2016. I received a download link, downloaded the software and started to install it. But the download link didn’t come with an installation key. I received the key 48 hours later.

I still have a suspicion that the store prepared the purchase page to be ready for the upcoming release, but didn’t mean to make it visible.  That would explain why the product page points to CR 2013. Also, no one else is selling or even mentioning CR 2016. SAP usually offers a big promotional discount on the current versions just before the new version is released and I haven’t seen that.

But despite all of that that the SAP store is selling CR 2016.  And, I have confirmed that the new features listed in my previous blog post are actually in the live product.




Server-based scheduler comparison (2016)

Sunday 29 May 2016 @ 11:42 am

I have just updated my comparison of server-based scheduling tools for 2016. These tools are similar to the desktop-based scheduling tools I write about every March, but these are designed to be run on server. This allows multiple people to schedule reports for automated delivery by Email, FTP or network folder.

There are 10 products on the list this year and a few few feature updates and price changes. The blog page provides a brief overview of each product. It also has a link to the feature matrix that compares roughly 70 features of these tools. There is even a feature glossary that defines all the terms. So if you need a short course in automating Crystal Reports delivery, this is a pretty good place to start.




DateDiff gives some surprising results

Sunday 22 May 2016 @ 10:00 am

I recently had a user who asked how he could report a bug in Crystal Reports. He was using the DateDiff function and thought it was behaving strangely. He gave me the following example to get the number of hours (h) between two DateTime values:

DateDiff ('h', {@Begin}, {@End} )

He was surprised to see that:
2:10pm to 2:50pm (40 minutes) would return a 0 hour difference while
2:50pm to 3:10pm (20 minutes) would return a 1 hour difference.

I explained that this isn’t a bug, but it is exactly what DateDiff was designed to do. This is true in Crystal Reports and pretty much any other language that uses DateDiff. When you ask for the difference in hours DateDiff truncates both DateTime values to the hour and ignores everything after that. Then it subtracts one truncated value from the other. Here is an example copied directly from the CR “Help” that explains the same thing for doing a DateDiff with years (yyyy):
—————————————————-

DateDiff ("yyyy", #12/31/1999#, #1/1/2000#)

Returns 1 (a 1 year difference), even though there is only a 1 day difference between the dates.

DateDiff ("yyyy", #1/1/1999#, #12/31/1999#)

Returns 0 (a 0 year difference), even though there is a 364 day difference.
—————————————————–
So, if you want to be more precise than that you need to specify a more precise interval. For instance, when I want to do hours or minutes I will usually do a DateDiff in seconds and either divide by 60 or 3600 to get minutes or hours.




Crystal Reports and duplex printing

Monday 16 May 2016 @ 12:56 pm

This has come up twice in recent weeks so it is time to make it a blog article.

The first question is usually this: Can Crystal print on both sides of the paper? This is called “duplex” printing and requires a printer that can print on both sides of a piece of paper. Any program that can print can be used to print in duplex, because duplex is controlled by the printer, not by the program. In other words when Crystal prints 2 pages it is up to the printer to decide if page 2 is on the back of page 1 or if it is on a separate piece of paper. Crystal won’t know or care.
But the second question is a Crystal question. How do I make sure every document starts on an ‘odd’ page when I am printing in duplex?

Say I am printing a series of documents, like purchase orders, in duplex. If the first PO is 3 pages long the next PO would start on the back of the last page of the current PO. So I would need every every PO that has an odd number of pages to generate an extra blank page. That way the next PO can start on it’s own piece of paper.

Here are the steps:

1) Take the group footer that marks the end of the document (e.g. the PO ) and split it into two sections, A and B, leaving the B section empty.

2) Go into the section expert for the B section and check “New Page After”

3) Click the expression button next to “New Page Before” and put in the following:

Remainder (PageNumber, 2 ) = 1

4) If you need to reset the page number for each group, put in that checkmark in this B section as well.

5) Click the expression button next to the “Suppress” for this section and put in the following:

Remainder (PageNumber, 2) = 1 and not OnLastRecord

I have read several forum threads on this but haven’t seen anyone that mentions step 5. That is because the problem that step 5 solves only shows up in rare cases. But lets say that the details and GF1A fill 2 pages exactly to the bottom of the page. Even if GF1B is very small it will create a new page all by itself and that will be an odd page. In this case the next group will start on an even page. So I have found that by adding the condition in step 5 that rare problem won’t occur.




Bug in the Crystal Reports “Alert” feature

Monday 9 May 2016 @ 7:01 pm

The alert feature in Crystal Reports allows you to define a trigger condition in your report.  Then when you run the report Crystal will check for that condition throughout the report.  If that condition occurs, Crystal will pop up a message box with text that you define, telling you that your trigger condition has been met.  It will even allow you to generate a list of the records or groups that triggered the alert.

Normally you can create two types of conditions. One is at the record level using a database field:

{Orders.Amount} > 8000

and the other is at the group level using a subtotal:

Sum({Orders.Amount}, {Customer.Name}) > 8000

You can also create more complex alerts that combine both record and group level conditions, but this is where the bug pops up. If you create a condition that combines 3 or more record level rules and one or more group level rules Crystal will accept that condition formula, but only on a new alert.  If you try to modify that alert logic Crystal will give you one of the following error messages:

One of the previous fields is not constant over group level of this field

or

This field is not constant over the group that the Alert applies to

But if you take that same modified condition and use it in a NEW alert, it will work just fine. So if you have to maintain alerts that are triggered by complex conditions, you might want to keep this in mind.

And if you want to see how you can use Alerts to have your reports “self-report” triggered conditions, give me a call to schedule an appointment.





Recrystallize Pro