views:

89

answers:

1

Does anyone of you know a way to format the caption of a chart in Crystal Reports? I have a number that stands for a specific year, this number is 4 digits long. I wnat the caption to be shown like:

2009

But the current way its shown is

2.009

EDIT: The years are dynamically load from the database and in the DB they are stored as a datetime Field that i select by using the year function...

A: 

I don't know anything about crystal reports. You should mention that in the question title, or at least in the question itself, not just in the tags.

I suppose you could use a real DateTime object (instead of an int) for the date and use some function to format dates to display only the year. Like this guy:

For example, I need a date formatting as following: 23-Mar-2007 The following formula will do the trick: ToText({MYFIELDNAME }, "dd-MMM-yyyy")

That relates to field names, but I suppose you can use the same function (ToText) for the caption of the chart?

You could also store the year in a string.

BlackShift
Thanks, worked fine^^
Gushiken