Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a Formula w/in a Formula

Status
Not open for further replies.

Jason2121

Technical User
Jul 28, 2009
46
US
I am using CR XI and I have created a Formula for Eliminating Entries for September in a Balance Sheet;

CASE 9:if ({@Account1} = "1.1180.22" or {@Account1} = "1.1190.77" or {@Account1} = "0.1190.9" or {@Account1} = "1.1190.99" or {@Account1} = "0.1401"
or {@Account1} = "1.4010.1" or {@Account1} in "0.4013.9" to "0.4016.5" or {@Account1} = "0.4017.1" to "0.4017.4"
or {@Account1} = "1.4040" or {@Account1} = "1.4510" or {@Account1} = "1.4550.1") then -({RV_GLSA_ROLLING_BAL.GL_PER_9_ACCUM_BAL})

I now need to make some adjustments to {@Account1} = "1.1190.99". I need to add some additional Accounts to "1.1190.99 and then deduct this total to the total amounts in {@Account1} in "0.4013.9" to "0.4017.4"

Is there a way I can create this by creating a separate Formula and add that to the original in place of or {@Account1} = "1.1190.99"? SO far I have not been able to, so do I need to create a Parameter and enter a Formula in the Record Selection Formula editor?

Any help would be great. Thanks

 
I think the task would be easier if you created several separate Formula Fields. A useful feature of Crystal is that it allows you to reference one formula field from another, or perform arithmetic with them.

The start of your formula could be separated as something like
Code:
{@Account1} = ["1.1180.22", "1.1190.77", "0.1190.9", "1.1190.99", "0.1401", "1.4010.1"]
You could then reference it just as @FirstChoice in other formulas.
You can also display such fields along with your data to debug, it should say 'True' or 'False', but will be blank if you hit a null.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
This what I did and it worked. Thanks for your advice, and it did take me awhile to figure out to go the detailed route. I hope this helps out anyone else who trying to do the same thing.

If {RV_GLSA_ROLLING_BAL.GL_YR} = {@Current Year} Then

If {@month} = 9 Then

If ({@Account1} = "1.1190.99") then -({RV_GLSA_ROLLING_BAL.GL_PER_9_ACCUM_BAL}) + 146147.94 else
if ({@Account1} = "1.1180.22" or {@Account1} = "1.1190.77" or {@Account1} = "0.1190.9" or {@Account1} = "0.1401"
or {@Account1} = "1.4010.1" or {@Account1} in "0.4013.9" to "0.4016.5" or {@Account1} = "0.4017.1" to "0.4017.4"
or {@Account1} = "1.4040" or {@Account1} = "1.4510" or {@Account1} = "1.4550.1") then -({RV_GLSA_ROLLING_BAL.GL_PER_9_ACCUM_BAL})

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top