Solved

Chart by Year side by side years in one chart

Posted on 2008-06-20
7
393 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
display n/a in column 2 31
Help with a Crystal Report Formula - remove time 5 34
Crystal reports vb.net 2 54
Page Break on Change of Field 2 17
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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