Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Legends in Crystal X

Status
Not open for further replies.

mycrystalbaby

Programmer
Jun 16, 2005
42
US
Hi,
Could you please help me with this problem or advice me a way out?

I am using Crystal X with SQL 8.0.
I have a chart, where I would like to show dynamic legends on change of month.
Is there a possibility?
We have data available in sql.
Thanks
A
 
Can you elaborate on what your are trying to do? What your data looks like and what you want the legends to say for each month.
 
I have a chart based on three months count.
Month1 has count of some numbers and Month2 has count of some numbers and so on.
I am using these as y-axis and X-axis is my range, that how much is the count for month 1 in that range.

Basically Months are not showing the actual month name, is there a way, I cna have the count and the month name both?
what I need to change to get that.
Thanks
Anita
 
If I'm understanding you correctly you don't want to the data titles to reflect the months as "01" or "02" or ...but rather as "January" or "February" or ... respectively.

If that's true you could create a formula that creates a data field related to each record that contains the month name. For example you could create a formula @TheMonth with the following code:
Code:
MonthName(DatePart("m",{table.your_date_field}))

Now rather than using your original date field to create the chart use the @TheMonth field you just created. It will then display the month name instead of the numerical equivilant. Note that you will have to change the sort order or the months will be in alphbetical sequance rather than in their correct order. This is done on the Chart Expert screen by hitting the Order... button after selecting your formula field as data grouping field.

 
Just one more comment that if you are dealing with records from more than one calendar year that you would need to update the formula to accomodate this fact. If your data was to span multiple years (3+) my solution would become very cumbersome and would probably not be a viable solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top