Archive for June, 2018



Set Datasource Location from tables to an SP

Saturday 30 June 2018 @ 11:14 pm

A customer had a report that read a handful of tables. He decided to write a stored procedure to return the same data as the tables. He planned to use “Set Datasource Location” to point the tables to the stored procedure, but soon realized that it wouldn’t work.

He could set the location of any ONE of the tables to the SP, but not all of them. If he tried to set the location of the second table to the same SP, Crystal would create a second instance of the SP and link it to the first, matching the links used in the original tables. I have never found a way to to set the location of several tables to a single query/view/SP.

So what is the best solution if you have to do this? Identify the table that provides the most fields to the report, and set the location of that table to the SP. That will map the largest group of fields automatically. The other tables will have to be removed and their fields added manually.

Another thing to keep in mind is that it is usually easier to change formulas than it is to delete and replace database fields on the report. So if one table is used primarily in formulas while another table provides raw fields for display, you might want to set the location of the table that provides the raw fields. Jamie Wiseman wrote an article years ago about creating reports that could be easily set to a new datasource. His method was to create a simple formula field for every database field used, then use those formulas for everything else in the report.  I sometimes do this, and I call these “feeder” formulas.  With Jamie’s method you can delete and add tables and then simply update the feeder formulas as needed.




Review Crystal Reports and earn a $25 Amazon gift card

Friday 22 June 2018 @ 5:38 pm

The SAP Vancouver office celebrated the 25th anniversary of Crystal Reports last fall. They even sent me a commemorative pin as part of the celebration.

Now, in keeping with the ’25’ theme, they have asked TrustRadius to collect independent user reviews of Crystal Reports and Crystal Server. If you complete the process you get a $25 Amazon Gift Certificate.

Note that these reviews are structured and very detailed. I wrote a review of Crystal Reports, both to support the product and so that I could write about the process for my readers. It took me about an hour to complete. There are 9 different sections to the review and many of the sections ‘recommend’ at least 50 words. The sections are:

  • Use Case
  • Pros
  • Cons
  • Rating
  • Alternatives
  • Features
  • Data Sources
  • Data Sharing
  • Context

You can read my review here.

A few other notes.
1) TrustRadius is independent of SAP and SAP doesn’t see the reviews before they are published. However TrustRadius has to approve and publish your review before you get your gift card. It can take up to a week after your review is published to get the card.
2) Before you can start the process, you have to sign into TrustRadius using your LinkedIn account.

If you decide to write a review you can use this link. If you encounter any problems, let me know.




Crystal Reports new features by version

Friday 15 June 2018 @ 11:25 am

My customers use a wide variety of Crystal Reports versions.  Just this past week I fixed a report for a customer using CRv8.5, which was released somewhere around 2001. There have been 8 newer releases since then and most have included new design features. Sometimes I forget which versions are needed to do certain things. Often I have tried to update a report for a customer, only to realize that my Plan A won’t work in their version. Whenever I need to check when a specific feature was introduced, I refer to the front page of my site which has links to my reviews for each new Crystal release. These articles include the list of new features for each version. But, this still means scrolling through through several pages to find each feature.

To make the process simpler I have created a grid that lists all of the new features added in the past 15 years, roughly 50. For each of the features I show when it was introduced, and which versions that support that feature.  Not only will this help me identify which features I can use for specific customers, it will also help me answer questions about the value of upgrading. I can point a customer to the grid and they can quickly see all the features that have been added since their version.  They can then decide if those features are worth the cost of the upgrade.

You can check out the grid on my site.  The features listed in blue are the ones I use the most.




Another free method for comparing rpt files

Friday 8 June 2018 @ 4:56 pm

One of my readers, Jiri Bus, needed a thesis project.  He decided to write an application that performed a detailed comparison between two reports and showed all the differences. He calls it rpt_diff and released it under the MIT open source license. I recently wrote up a simple method that relies on the features included in the “Report Definition” export.  Jiri’s project takes a deeper dive into the object model and includes many more features for comparison.
His application is free but it takes a few extra steps to deploy and use. Here is what you need to do to use rpt_diff:

1) Download and install the 32-bit Crystal Reports runtime for .net.
2) Download and install KDiff or another equivalent program for comparing text files.
3) Create a new folder for the rpt_diff application file and associated files.
4) Download the (already compiled) rpt_diff.exe and place it in the new folder (no need to install it).
5) Place the two reports you want to compare into that same new folder.
6) Right click on my sample batch file and download it in the same new folder:

sample batch file

(Note – if you just click on the file link the file will open in the browser rather than downloading.)

7) Edit the batch file so that it has the correct path to KDiff and the correct names of the two rpt files to compare.
8) Save the modified batch file, close the file and then run it by double-clicking on it.

You should see two XML files open in KDiff, with all their differences color coded.

Any time you want to compare another pair of files, just copy them to this folder and put their names into the batch file.

And thanks again to Jiri Bus for sharing his work.




Jeff-Net

Recrystallize Pro

The Expert Series