Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: ToText Function Post Reply Post New Topic
Page  of 2 Next >>
Author Message
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Topic: ToText Function
     Posted: 01 Mar 2010 at 9:00am
Hey guys,

Does anyone know how to incorporate the ToText fuction with a Chart?

In a Cross tab Expert, under the 'Group Options' for the Column, there is an 'Options' tab which allows you to create a formula ("'" & totext({table.field},"yy MMM").

However, in the Chart Expert there does not seem to be a place to change the format.

Any ideas?

Edited by hammondrob - 01 Mar 2010 at 11:04am
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 01 Mar 2010 at 11:04am
ideas?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 01 Mar 2010 at 11:30am
I do not know if this will work (of if CR will allow it).  Can you create the chart based on the formula you have there?
 
 
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 01 Mar 2010 at 11:49am
Thanks for the reply kev.

Yes, the chart does work. However, on the x axis, the date displays as 02/2009, 03/2009 etc.

I want the display to read as '09 Feb, '09 Mar.

I actually threw in the ToText formula at the end of the if statement:

if {table.date} <= {?date_start} then {?date_start} else {table.date};
"'" & totext({@Column},"yy MMM")
(this is the formula i have in the Chart Expert for the columns)

This did in fact change the display to what i want, but then Crystal dispayed the months in ascending or descending order, instead of Jan,Feb,Mar,Apr order.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 01 Mar 2010 at 12:30pm
Controlling the order is issue, I wish I had an answer.
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 02 Mar 2010 at 6:25am
Thanks.

Any other thoughts?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2010 at 6:56am

Go back to just using the original date field as is with no formula conversion (grouped on Month as you had it).

Right click ont he heade field and select Format Field.
Select the Date and Time tab.
Selct the "Mar-99" option (or whatever you want for display).


Edited by DBlank - 02 Mar 2010 at 6:57am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2010 at 7:00am
Sorry, I see you want YY-MMM so do the same thing but choose Custom Style instead of 'Mar-99'.
Change the Order to YMD.
Change Month to 'Mar'
Change Day to 'None'
Change Year to '99'
Change First Seperator to '-' (type it in)


Edited by DBlank - 02 Mar 2010 at 7:02am
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 02 Mar 2010 at 7:29am
Thanks dBlank,

That method would work for the CT, but it is the Chart that is causing the problem.
The X axis date format is MM/yyyy, which is what i need to change...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2010 at 7:57am
What kind of chart are you using?
IP IP Logged
Page  of 2 Next >>
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