Solved

Chart by Year side by side years in one chart

Posted on 2008-06-20
7
389 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

25 Experts available now in Live!

Get 1:1 Help Now