Jump to content

Recommended Posts

Posted

When formatting a number field, you have the option of enabling the currency field.

I suppose the usual would simply be $ or %,

but you could actually write more than that.

For example, if you had a grand total of deferrals on your report, you could make the currency symbol

"Wow. The total deferrals this year was

and the report will print that expression in addition to the total. just make sure to include an extra space at the end of your so called currency symbol. (Or at the beginning if you set the format to print the currency after the field.

Granted, you could accomplish the same thing with a formula, or use two fields - one being a text object and the other being your total field. But then, this tip was for the not-so adept. something easy. a simple modification to the report. shoot, this one is so easy and simple, yet it didn't even make the Crystal Reports for Dummies book.

Date fields have the same option, in fact, you can add a prefix or a suffix or both.

This all came about because we wanted to use the long form of date (e.g. December 31, 2003)

A typical formula is written as

"ADP/ACP Nondiscrimination Test for Plan Year End "+ToText({PLANEEKMTEST.YRENDDATE},"MM/dd/yyyy")

however, the date will print as 12/31/2003

By using prefix you can accomplish the same thing without even having a formula.

hey, I said this was for the not-so adept.

Posted

Personally, I would use two fields. I know I've used the currency symbol field for things other than $ and %, but I think using it for phrases is asking for trouble down the road. Especially if not-so adept people are using the report file or you are in a multi-user environment.

For example, if you put "Wow. The total deferrals this year was:" in the currency field and a not-so adept user wanted it to say "Wowwie. The total deferrals this year was:" they would have an awful time finding it and making the change. If there are two fields (one being text), the user could easily see where to make the change.

For your date example, I would use the following:

ADP/ACP Nondiscrimination Test for Plan Year End "+ToText({PLANEEKMTEST.YRENDDATE},"MMMM dd, yyyy"). Crystal should take 12/31/2003 and convert it to December 31, 2003.

I think your suggestions to put the prefix and suffix fields to work is a great idea, I don't agree they are the best solutions in your examples.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Terms of Use