PDA

View Full Version : Grouping Data for Report



emk
04-07-2010, 08:38 AM
I have attached a word document of part of a report that I'm trying to get right. The Region1000 table is correct. The Region9000 table is not correct. There should be a 9000 Undesignated Region 9 in the blue section of the Region 9, but since the report is grouped by Region (listed in the tan bar above the blue) then by Code, it doesn't pull the 9000 charity code first so it won't display in the blue area. Following is the code for the blue area.

=IIf([CharCode]=1000,1000,IIf([CharCode]=2000,2000,IIf([CharCode]=3000,3000,IIf([CharCode]=4000,4000,IIf([CharCode]=5000,5000,IIf([CharCode]=6000,6000,IIf([CharCode]=7000,7000,IIf([CharCode]=8000,8000,IIf([CharCode]=9000,9000," ")))))))))

Let me know if you need any other info. I'm at a loss on how to fix this.

austenr
04-07-2010, 02:21 PM
Not sure but I think the maximum number of nested IIf statements is 7. Looks like you are over the limit.

OBP
04-08-2010, 03:15 AM
As well as austenr's answer, I can't actually see what your IIF statement is doing, doesn't
IIf([CharCode]=1000,1000
give you 1000 when 1000?