Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Graphing Yearly Trends Post Reply Post New Topic
Author Message
Luis2101
Newbie
Newbie


Joined: 14 May 2008
Online Status: Offline
Posts: 18
Quote Luis2101 Replybullet Topic: Graphing Yearly Trends
     Posted: 09 Sep 2009 at 12:45pm
Hello everyone,

I'm working on this report where I'm showing sales data monthly (the sales numbers are actually summaries of each invoice record in the database and I'm grouping the results monthly).

So it looks something like:
01/2008 - $1500
02/2008 - $1800
...
01/2009 - $3000
02/2009 - $5000
03/2009 - $1300

...for several years. 

What I would like to do is create a Graph that will allow me to create several series' for each of the years shown. This way we can look at monthly trending from year to year. So in the example above I would have one line series (I was thinking a line chart) for the 2008 months, and another line series for the 2009 month sales.

The problem is that all the data is coming from one field (in this case an "Ext Price" formula which is the amount for the invoice minus any discount that invoice line has.

Any idea how I can do this?
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 09 Sep 2009 at 4:34pm
what exactly the problem with the field extprice?

Try this
1.create a formula for year like year({inv_date}) say as @InvYear
2.in line graph chart expert
Place chart: once per report
on change of : i.{inv_date}..under Order select for     each month
               ii.@InvYear
3.under show values select ExtPrice formula to summarize.

HTH,
Jyothi



IP IP Logged
Luis2101
Newbie
Newbie


Joined: 14 May 2008
Online Status: Offline
Posts: 18
Quote Luis2101 Replybullet Posted: 10 Sep 2009 at 5:40am
Hey Jyothi,

What you suggested wasn't exactly what I was looking for, but it put me on the right track. Your idea gave me 3 series (which is what I wanted), but because it uses the "{inv_date}" field (which includes year), the series did not superimpose each other (it was like 1 series but broken into sections).

So what I did was I created a Month formula and used that as my first "On Change Of" field. The result is exactly what I was looking for, in the X Axis I have months, and then I have a series for each year.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum