Cleaning Up Fields

In this article we will focus on cleaning up our report a bit.  Here’s where we left off:sampledata

Comparing this to our mock-up we want to:

Change the page orientation
Edit the headers
Remove the time from the gift date
Show the currency symbol only once per page

Change the page orientation 

Let’s change the page orientation to landscape for this report even though it only has four columns and already has plenty of room.  I usually change most of my reports to landscape at the beginning even if it’s not absolutely necessary.  I do this because it allows for additions later on, which almost always happen.  It’s not a big deal to change it later but it’s become something of a habit for me at this point.

Anyway, to change the page orientation from portrait to landscape open the File menu (upper left corner of screen), then select “Page Setup…”  This will open the Page Setup window.


In the Orientation section select Landscape, click the OK button and then save your report.  I don’t think I’ve mentioned it yet but I recommend saving your report often.  There have been too many times where I did a lot of work on a report without saving it just to have it crash and close on me.  So now I’m overly cautious and save after just about everything I do.  Changing the page orientation is one place that crashes used to happen most often which is what made me think to mention it now.  Moving on…

Edit the headers

The headers that Crystal Reports adds by default are just the field names and are usually of no use to anyone that will actually be reading your reports.  Let’s change them to something that makes sense.  

You can edit the headers on either the Design or Preview tab.  I prefer to edit the headers on the Preview tab so I can see the data in the field/column.  The headers on this report are easy to figure out without seeing the data but that’s not always the case.  Double-click on the header field (or right-click and select Edit Text) and edit the header as needed then click anywhere off of the field to exit editing mode for that field.  I’m going to change “GfCnBio_Name” to “Constituent Name”.  I’ll follow the same steps for the other three headers and make the following changes:

Gf_Date to Gift Date
GfFnds_1_Description to Fund Description
Gf_Amount to Gift Amount

Save your report.

Remove the time from the Gift Date

This is an easy one to change and can be done on either the Preview or Design tab.  Right-click on the field itself (not the header) and select Format Field.  This opens the Format Editor window and should open to the Date and Time tab.  For whatever reason the one date format I use the most (MM/DD/YYYY without leading zeros) isn’t listed in the Style list/window.  Instead of changing one of the default styles click the Customize button which will open the Custom Style window.  On the Date and Time tab change the Order from “Date Time” to “Date.”  You’ll  see the sample on the bottom change to the format we want.  

Click the OK button to close the Custom Style window, and then click OK again to close the Format Editor window.

Save your report.

Show the currency symbol only once per page

We really don’t need to see the currency symbol on each line so we will change the report so the symbol only shows on the first line of each page.  Just like the other changes we can also make this change on either the Design or Preview tab.  

Right-click on the Gift Amount field and select Format Field.  This will open the Format Editor window.

formateditorOn the Number tab click the Customize button to open the Customize Style window.








Then on the Currency Symbol tab make sure the Enable Currency Symbol check box is checked, and then select Fixed.  This will align the currency symbol on the left of the Gift Amount field no matter how many digits the gift amount is.  Then check the One Symbol Per Page checkbox.

Save your report and view your report on the Preview tab.  It should look something like this:

In the next article we’ll discuss sorting groups, summaries and totals.