Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: X scale and Y scale Post Reply Post New Topic
Author Message
cachris
Newbie
Newbie


Joined: 16 Jun 2015
Location: Switzerland
Online Status: Offline
Posts: 6
Quote cachris Replybullet Topic: X scale and Y scale
    Posted: 24 Jun 2015 at 5:19am
Hi to All,

I have a line chart with dual Axes.
I was using a date field from database to drive the x axis with a date format dd.mm.yy.
The scales Y1 and Y2 where setup to Auto-scale (min value, max value, major interval, minor steps).

In order to be able to display the month in text (Jan) in two langages, I've changed the date field (db field) and put an formula that contains

Select Month({DB_datefield})

Case 12:
"Dec "+ ToText ({DB_datefield},'yyyy')
... and so on for all months

The display of x-axis is working as expected but the autoscale for y and y2 axes does not start well.

Before changing the date field (on change) the y1 was starting at 100 and after I've changed with the formula the y is starting at 200.

Is someone able to help ??

Thanks

Chris
Chris
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Jun 2015 at 3:57am
not entirely following your described process but my guess is that you are now looking at more grouped summary values. When you were using the actual date it was using a per day summary amount, by changing it you essentially altered it to a month grouping and your summarized data points increased in value so the autoscale is accounting for the higher summarized totals.
IP IP Logged
cachris
Newbie
Newbie


Joined: 16 Jun 2015
Location: Switzerland
Online Status: Offline
Posts: 6
Quote cachris Replybullet Posted: 25 Jun 2015 at 5:47am
Hi,

Thank you for your answer.
I understand but when I run the same report with another time range, longer, the y axis is as expected and the lines displayed properly and the dates (MMM YYYY) are well formatted in the x axis.
The problem is really the y axis, where start the 1st point of the line.

Is it possible to change the display of the x axis label ?

Thank you

Chris
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Jun 2015 at 6:23am
I assume you want it dynamically altered. I am not aware of a way (in vXI or below).
Changing the time frame changes your data set. I am only guessing at your issue as I can't see your data nor your entire report design.
 
When you have it set to use the date field (not the MMM-yyy text) and it displays as you want it to,
go into the chart expert
data tab
select the date field in the "on change of record"
select the ORDER button
change the 'section will be printed' to "for each month"
 
no look and see if your chart is acting the same way as when you use the text version.
 
IP IP Logged
cachris
Newbie
Newbie


Joined: 16 Jun 2015
Location: Switzerland
Online Status: Offline
Posts: 6
Quote cachris Replybullet Posted: 26 Jun 2015 at 3:26am
Hi,

Yes you're right, the chart display is the same as with the formula.
The first point of my line is starting at 202, the second point is at 100.2.
It's like CR is making the sum of the 1st and 2nd point.

As I see I can't put any formula in Chart Expert-->Data-->Show Value(s).

I've tried to replace in Chart Expert-->Data-->Show Values the db_field with an formula, but it does not work.

Do you have any idea how to avoid CR to sum the 1st and 2nd values ?

Thanks
Chris
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jun 2015 at 3:55am
it acts like a grouping so you need to apply a group summary to it.
I guess I don't know what your chart is supposed to be conveying to the audience. What are you summarizing for the month? should you be showing a min or a max instead of a sum? should you not be grouping on the month as it is really a daily instance and you are stuck because of the month display issue?
 
IP IP Logged
cachris
Newbie
Newbie


Joined: 16 Jun 2015
Location: Switzerland
Online Status: Offline
Posts: 6
Quote cachris Replybullet Posted: 26 Jun 2015 at 4:20am
It's a line chart with only one line.
The x axis display dates.
The y axis display performance in %.
The value are displayed with the line.

When I'm running the report with a larger date range (at least 10years) it display correctly the line and the x + y axis.
In this case I'm running the report on 3 years it seems that the 1st + 2nd values are summed and displayed as one point (markers only).

When I'm getting the value from db (excel) data are ok.
The data are displayed by month, except the 1st value is (example):
30.01.2000 100
31.01.2000 100.29
29.01.2000 100.90
and then one value per month until end date.

Thanks
Chris
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jun 2015 at 6:48am
so what do you want it to do when two data points (% marker) fall inside the same month.
Which one is "correct" for display in this report
IP IP Logged
cachris
Newbie
Newbie


Joined: 16 Jun 2015
Location: Switzerland
Online Status: Offline
Posts: 6
Quote cachris Replybullet Posted: 28 Jun 2015 at 9:52pm
The solution is to change the 1st date, and put the value in a previous month, like :
31.12.1999 100
31.01.2000 100.29

If by grouping by month has the described effect, so by changing the month will solve this case.
I'm checking a way to change the 1st date in CR, if you have any idea you're welcome.

Thank you DBlank.

Chris
Chris
IP IP Logged
cachris
Newbie
Newbie


Joined: 16 Jun 2015
Location: Switzerland
Online Status: Offline
Posts: 6
Quote cachris Replybullet Posted: 30 Jun 2015 at 9:52pm
Hello,

Thank you for your help DBlank, the problem is solved.

Bye.
Chris
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.