Solved

Chart by Year side by side years in one chart

Posted on 2008-06-20
7
397 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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 35

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 35

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 35

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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