Finding a Simpler Way
-
- Posts: 13
- Joined: Tue Oct 10, 2017 12:44 pm
Finding a Simpler Way
(RR v. 9.0 xbase)__The more reports that I build, the more that I am finding the need for a function that will give me a True-value when a condition is met for the first(and only the first)time in a report. I have no problem creating an IIF where a True-value is returned when a condition is met, but when I try to pull a True-value just for the first instance, it starts getting complicated. I^ve been doing it with two calculated fields. One IIF, once the condition is met, repeats the true-value to the end of the report. A second IIF gives a true-value only when the first IIF is true and the Previous(first IIF) is blanknum(). Here is an example:____equip........quant____shirts..........12__baseballs.......5__bats.............6__gloves.........14__shoes..........24__helmets.........6__hats............14____Calculated Field: getsix____IIF(quant=6,1,PREVIOUS(getsix))____equip........quant.....getsix____shirts..........12__baseballs.......5__bats.............6.........1__gloves.........14.........1__shoes..........24.........1__helmets.........6.........1__hats............14.........1____Calculated Field: pullfirst____IIF(getsix=1 AND PREVIOUS(getsix)=blanknum(),1,blanknum())____equip........quant.....getsix......pullfirst____shirts..........12__baseballs.......5__bats.............6.........1...............1__gloves.........14.........1__shoes..........24.........1__helmets.........6.........1__hats............14.........1______Is there a simpler way of doing this? Is is possible to do this in one field?____P.S. Is there an easy way of tabbing information in a post such as this?
=> RE: Finding a Simpler Way
Where you are trying to go with this? Do you want to be able to know that bats was the item that had the first occurence of the value 6?__Knowing where you are trying to go would help me to suggest alternatives to getting there.____Kathleen__R&R Support