mowit
asked on
Help with formula
I have the following formula in the detail section of a sub report I'm expecting it to first check the groups then the Boolean if all the criteria is met then do the summing. My code isn't working, any suggestions. I also tried a record selection formula of which is also pasted below
Detail Section
whileprintingrecords;
if
(
{somefield.unbdTitleGroup} <> 'Tax' and
{somefield.unbdTitleGroup} <> 'Officers' and
{somefield.unbdTitleGroup} <> 'Senior consultants' and
{somefield.unbdTitleGroup} <> 'Economic analysts' and
{somefield.unbdTitleGroup} <> 'Economic Research Staff' and
{somefield.unbdTitleGroup} <> 'Other Professional services'
) and
{somefield.IsExcluded} = false then
numbervar otherChrges := otherChrges + {somefield.PresAmt}
Record selection formula
not isnull({somefield.unbdTitl eGroup}) and
len(trim({somefield.unbdTi tleGroup}) ) <> 0 and
{somefield.unbdTitleGroup} <> 'Tax' and
{somefield.unbdTitleGroup} <> 'Officers' and
{somefield.unbdTitleGroup} <> 'Senior consultants' and
{somefield.unbdTitleGroup} <> 'Economic analysts' and
{somefield.unbdTitleGroup} <> 'Economic Research Staff' and
{somefield.unbdTitleGroup} <> 'Other Professional services'
Detail Section
whileprintingrecords;
if
(
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
) and
{somefield.IsExcluded} = false then
numbervar otherChrges := otherChrges + {somefield.PresAmt}
Record selection formula
not isnull({somefield.unbdTitl
len(trim({somefield.unbdTi
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
{somefield.unbdTitleGroup}
ASKER
Not getting an error its still calculating the groups I'm trying to exclude
try changing and to or
as shown below
as shown below
whileprintingrecords;
if
(
{somefield.unbdTitleGroup} <> 'Tax' or
{somefield.unbdTitleGroup} <> 'Officers' or
{somefield.unbdTitleGroup} <> 'Senior consultants' or
{somefield.unbdTitleGroup} <> 'Economic analysts' or
{somefield.unbdTitleGroup} <> 'Economic Research Staff' or
{somefield.unbdTitleGroup} <> 'Other Professional services'
) and
{somefield.IsExcluded} = false then
numbervar otherChrges := otherChrges + {somefield.PresAmt}
ASKER
That was how i initially wrote the code, doesn't work.
How are you displaying the value?
Since it is in a subreport, are you resetting it anywhere?
Did you declare it anywhere else?
mlmcc
Since it is in a subreport, are you resetting it anywhere?
Did you declare it anywhere else?
mlmcc
ASKER
I'm only resetting the otherChrges numbervar in the group header. Not declaring it anywhere else except for where I'm doing the summing.
ASKER
oh yea and I'm displaying it in the footer of the group.
ASKER
So it appears that my formula is working, i unsuppressed the detail section and they all show 0.00 why then is the footer section showing the total. It should be zero.
Capture.PNG
Capture.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi again
sorry I am really confused and a bit lost
this is what i think you are doing!!
r u doing a running total on a field based on the conditions between line 1 and line 12. Then you want to display this count in the group footer and then when the group changes reset this value to 0
am I on the right lines
sorry I am really confused and a bit lost
this is what i think you are doing!!
r u doing a running total on a field based on the conditions between line 1 and line 12. Then you want to display this count in the group footer and then when the group changes reset this value to 0
am I on the right lines
ASKER
I was looking at the wrong field basically. The grand total is displayed on the main report.
ASKER
resolved on my own
when you try this in crystal what error mesage are you getting