Problems with IIF()
-
- Posts: 9
- Joined: Tue Oct 10, 2017 12:44 pm
Problems with IIF()
The following code works in both FoxPro and Infinity__and if the invoice was in 2008 shows the quantity shipped __if in any other year shows 0.____IIF(year(invdte)=2008,QTYSHP,0)____I would like to have a space " " show up on the report - much easier to look at - if there were no shipments of this item in the year 2008.____The following works in FoxPro but NOT in Infinity.____IIF(year(invdte)=2008, QTYSHP," ")____I don^t understand why it won^t work. Is my decrepit old mind missing something?__
=> RE: Problems with IIF()
The problem is that you can^t mix types in Infinity like you can with FoxPro. Infinity functions require that all returned values be consistent (all logical or character for instance).____You have a few choices:__1. On the report layout, you can edit the property of the formula to not show zeroes.__2. You can change QTYSHIP to return something else, like STR(QTYSHIP)__3. You can replace the 0 with BlankNum()____
Chris Strasser
Liveware Publishing, Inc.
Work bigger.
Liveware Publishing, Inc.
Work bigger.
-
- Posts: 9
- Joined: Tue Oct 10, 2017 12:44 pm
==> RE: Problems with IIF()
Thanks, It^s nice to see that it^s not me - just a limitation in R&R:)