Filtering Data in Crystal Reports

When you run a report in Crystal Reports, you have a lot of latitude as to what goes in, how it’s formatted and organized, and so on. But one consideration that doesn’t always get mentioned is how to leave data out.
Turns out, it isn’t difficult. In fact, the technique is similar to one we find in several other programs which deal with data and databases.


After opening the program, the database and the report in question, the feature that does the filtering is the Select Expert–specifically, the Record part.


Among the logical operators available to us is “Is Not Like” (sometimes seen in other programs as “< >” or “Not Equal To”). This is the one that says “DON’T show me…” whatever it is you want to exclude from a given field, like City.


But the next part is also easy–just a little different. If, let’s say, we want Crystal to show all cities in a shipping list other than Albuquerque (watch your spelling on this one! 🙂 ), we put that name between asterisks, like so: *Albuquerque*.


This means that every record whose city name does NOT include Albuquerque (beginning with, ending with, or containing) will show in the report.


It may seem a little odd at first, to want to exclude information in Crystal Reports, since usually we’re trying six ways from Sunday to figure out how to include information. But don’t forget that panning for gold meant sifting out what you didn’t want, and reducing a sauce involves removing water or other fluid to make it denser and more flavorful.
As a related point, doing Web searches can involve a similar idea. We often use Google to look for things, but the Advanced search capability lets us say, in essence, “Look for this and this but NOT that.” Hardly ever gets used, but it’s always there if we need it. Ditto in Crystal.

Crystal Reports – Add True Bullets to a List in a Text Object with the CHRW Function

Suppose you want to display a list of items in a text object and you want that list to appear as a bulleted list.  If your list is hard coded (i.e. USA, Canada, Mexico), then you could simply type the character that represents a bullet, like an asterisk, and have your list in no time flat.

Our example will have a bit of static text at the beginning followed by the bullet list.  The static text will read as follows:

“Last Year’s Sales and Suppliers for”

We will follow up the text with a carriage return to ensure the bullet list begins on a fresh row in the text object.  This is where you could type something like the following:

* USA

* Canada

* Mexico

The finished product would look like:

Bullet01

Suppose your list if items is the result of selections made within a parameter and you want to display that user-defined list with bullets.  The first thing you have to realize is that you can’t just place the parameter in the text box and get the list. (more…)

Crystal Reports – Missing Template Preview

When applying a template to a report, it’s often preferred to “peek” inside the template to see what it has to offer prior to applying it to your report; to “take it for a test drive”, as it were.

If you have a vast template library, and many templates are similarly named, it can be of great benefit to see a preview of what you will receive if applied.  The Template Expert provides just such a preview.

Preview01

For those who prefer to create their own templates, and possibly add them to the library, the preview feature may not display if certain prerequisites have not been satisfied. (more…)

Crystal Reports – Importing Values and Descriptions into Parameters

If you are creating a list of choices for a parameter drop-down list, you can acquire the choices from several sources:

  • Manually enter the choices in the list (static and least exciting of all of the options)
  • Append a unique list of choices derived from a field in the database (static)
  • Point to a database field for available existing choices (dynamic)
  • Import items from a text file (static)

Each of the options has their pros and cons.  If you are trying to generate a list that is unlikely to change (like a list of states in the USA) and you need to ensure all options are made available from Day 1, the first option of manually entering all of the choices is the typical approach.

But what if all of those choices exist in another report or file?  In this case, the ability to import list selections has great appeal. (more…)

Crystal Reports Multi-Pass Processing Engine

Crystal Reports uses a three-pass reporting method to generate reports.  A pass is a process that Crystal Reports uses each time the data is read and manipulated.  Depending on the complexity of the report Crystal Reports may make 1, 2, or 3 passes over the data.  This feature allows for complex reporting and formula manipulation.

CRMultiPassModel (more…)

Crystal Reports – Adding a Watermark to a Report

If you have ever looked for the watermark feature in Crystal Reports, you no doubt walked away smothered in soul-crushing despair wondering how Life could be so cruel.

True, there is no official tool in Crystal Reports that adds a watermark to a report, but that doesn’t mean it can’t be done.  Adding a watermark just takes a bit of creativity and a handful of mouse click and keystrokes.

The trick is to add a subsection and underlay the following sections in the report.  The steps are as follows: (more…)

Crystal Reports Clear Recent Reports History

Crystal Reports – Clear Recent Reports History

As with most applications, Crystal Reports maintains a history of the last several reports opened so as to facilitate repeated access.

ClearRecent01

This is a very helpful feature, but there comes a time in every report user’s life when they just want to clear the list and start clean.

Many applications contain a mechanism that allows the user to clear either individual entries or empty the entire list.  Sadly, Crystal Reports contains no such feature. (more…)

Crystal Reports Training Courses

Crystal ReportsSkillForge offers a comprehensive line-up of Crystal Reports training courses. From introductory to more advanced topics our instructor-led, online and onsite Crystal Reports courses are delivered by expert instructors.

Our Crystal Reports 2011 Training class – like all of our classes –  includes an in-depth course manual – perfect for reference after class, as well as hands-on exercises to practice concepts demonstrated throughout the course.  See all of our Crystal Reports Training classes by visiting our Crystal Reports class page.