Solved

Chart by Year side by side years in one chart

Posted on 2008-06-20
7
388 Views
Last Modified: 2011-09-20
Hi is it possible to create a report with a chart in it with two years side by side for comparison by month?

e.g.


april 2007 april 2008  may 2007 may 2008  june 2007 june 2008 in a bar chart?

I couldnt figure it out and I figured i would ask.
0
Comment
Question by:shockacon
  • 3
  • 2
  • 2
7 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 21835662
Have you checked the sample reports.  In particular the Chart.rpt example.  It has one that shows this year and last year by client.  What you want should be similar.

mlmcc
0
 

Author Comment

by:shockacon
ID: 21835722
Im looking at it.. it has 17 pages on the one im looking but I dont see one that does what you are reffering to.. can you be a little more specific?  which chart?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 21836327
There is a BAR chart.  It is on page 5.  It isn't doing exactly what you are but the idea might be similar.

mlmcc
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 34

Expert Comment

by:James0628
ID: 21840294
I'm no chart expert, but I think all you need is to group the data by month in that order.  One way to do that would be to create a formula that combines the month and year, in that order, and group on that.  For example:

// mm-yyyy
(Month ({table.datefield}) * 10000) + Year ({table.datefield})


 That would give you values like 042007, 042008, 052007, 052008, etc.  Grouping the data for your chart on that formula should give you the order you want.  I think.  Like I said, I'm no expert on charts, but it seems like it should work.

 James
0
 
LVL 34

Accepted Solution

by:
James0628 earned 500 total points
ID: 21842684
I didn't think about this until later, but grouping on that formula would change the labels on the bottom axis to those values (042007, 042008, etc.), which aren't the best labels.

 You could improve them a bit by changing the formula to output a string and adding a "-" or "/", so you get values like 04-2007 or 04/2007.  They'd still sort the same way in the chart.  For example:

// mm-yyyy
CStr (Month ({table.datefield}), "00") + "/" + CStr (Year ({table.datefield}), "0000")


 Or, you could output strings like "April 2007", but they wouldn't sort properly unless you went into the Data tab of the Chart Expert and used "specified order" to set a specific order for the months, but you'd have to do that for every month/year combination that would show up in the chart, so it may not be very practical.

 James
0
 

Author Comment

by:shockacon
ID: 21857970
James, you the man! this completely worked!! I thought this was impossible.. thanks!

now that youve given me exactly what I wanted I need to figure out how to format it... its hard to read in the sense that they want spaces or padding between the two months etc.


Again thanks A+
0
 
LVL 34

Expert Comment

by:James0628
ID: 21862874
You're welcome.  I'm glad I could help.

 As for the spacing, that could be a problem.  My impression is that you don't have much (any, really) choice there, but I could be wrong.  If you get stuck, you could always post another question about that (assuming that you haven't already).  I'm sure that there are people around here that know a lot more about CR charts than I do.

 James
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now