Print Page | Close Window

Change Signs on Numbers

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Announcements
Forum Discription: Please check this section for the latest announcements from Crystal Reports Forum
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2370
Printed Date: 16 May 2024 at 11:53am


Topic: Change Signs on Numbers
Posted By: bucky7199
Subject: Change Signs on Numbers
Date Posted: 19 Feb 2008 at 8:53am
I have created an income statement in a cross tab report in Crystal and have flipped the signs of the expense accounts so they all appear positive in the reports. I have 2 revenue accounts that I want to flip the signs on. Can someone give me the Crystal code to do that? I tried this:
 
{GLChart.Chart} = "701000", "701200"
 
It didn't work. Said the remaining text didn't appear to be part of the formula.
 
Thanks.


-------------
Dan S.



Replies:
Posted By: hilfy
Date Posted: 19 Feb 2008 at 10:54am
Try one of these:
 
{GLChart.Chart} in ["701000", "701200"] (I don't know if I have the syntax right on this - you may have to tweak it.)
 
or
 
{GLChart.Chart} = "701000" or {GLChart.Chart} = "701200"
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: bucky7199
Date Posted: 19 Feb 2008 at 11:00am
Thanks Dell, I will give it a go.

-------------
Dan S.


Posted By: bucky7199
Date Posted: 19 Feb 2008 at 11:10am
That's the right syntax Dell. I checked it for errors and it is error free.
 
However, it's still not changing the signs on my revenue numbers. I am right clicking in my cross tab chart on the row and going into format editor, custom style, number and clicking on the formula button and entering my formula there.  Any idea what I am doing wrong?
 
 


-------------
Dan S.


Posted By: BrianBischof
Date Posted: 19 Feb 2008 at 11:57am
Which formula button are you using? Is it the Reverse Sign For Display property?

Also, rather than using the field name directly, I would use the cross-tab function that returns the field value:
GridRowColumnValue ("GLChart.Chart") IN ["701000", "701200"]



-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: bucky7199
Date Posted: 19 Feb 2008 at 12:51pm
Hi Brian,
 
By the way, bought your book Crystal Reports Encyclopedia, and it has helped me a bunch in making this income statement.
 
Yes, it is formula button for the Reverse Sign for Display Property.
 
Thanks,
 


-------------
Dan S.


Posted By: bucky7199
Date Posted: 19 Feb 2008 at 1:34pm
Brian,
 
That worked!!!! Thanks man.


-------------
Dan S.


Posted By: BrianBischof
Date Posted: 19 Feb 2008 at 2:13pm
Great!




-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: bucky7199
Date Posted: 19 Feb 2008 at 3:06pm

I'd be happy to do it Brian. I'll do it when I get home tonight.

 

Thanks.



-------------
Dan S.



Print Page | Close Window