Print Page | Close Window

Groupings

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12632
Printed Date: 06 May 2024 at 3:51pm


Topic: Groupings
Posted By: pfangus
Subject: Groupings
Date Posted: 16 Mar 2011 at 12:17pm
I am working in Crystal 10... I have a formula that returns a number (1 through 7) to determine a group.  The formula works correctly, but then I want to add a group to the report based off of the formula.  I click on INSERT > GROUP and in the drop-down box, my formula is NOT listed... WHY??
 
The formula is this...
 
iif ( sum( - 0,1 - {@IsEmb})>0,1 ,
        iif({vSJFS_PackListData.CSR}="INT",2,
        iif({vSJFS_PackListData.CSR}="CAN",3,
        iif(SUM( - 0 - {@IsCR})>0 AND SUM( - 0,4 - {@IsSJ})>0,4 ,
        iif(SUM( - 0,5 - {@IsSJ})>0,5 ,
        iif(SUM( - 0,6,7 - {@IsCR})>0,6,7 )))))
);
 
Is it because the formula is too complex? Any help would be wonderful!!



Replies:
Posted By: lockwelle
Date Posted: 17 Mar 2011 at 3:28am
the formula has a sum in it, and the it needs to call other formulas.  If the other formulas do anything besides somethng like 'if {table.field}=x then {table.field2} else {table.field3}' CR can't deterimine the value during its initial 2 passes through the data.  At run time, as it is reading the data for the 3rd time, it is able to determine values correctly.
 
HTH



Print Page | Close Window