Extender Fields within Calculated Fields in Report Writer

Thanks to Josh from Microsoft for helping me figure this one out. Thought I'd share it to brighten someone else's day. Objective

  1. Pull 2 Extender Fields to display side-by-side on a report
  2. Use the  Extender fields in 3 different calculated fields involving rounding and IF statements within in IF statements. To make it more fun, calculated field 1 is referenced in calculated field 2 and so forth.
Solution 1. Pull 2 Extender Fields to display side-by-side on a report Follow this article to pull the 2 Extender fields then drag/drop and format them onto the report. http://support.microsoft.com/kb/935385. Here’s what my calculated expression looked like for one of the extender fields. image 2. Use the 2 Extender fields in 3 different calculated fields involving rounding and if-statements within another IF statements. To make it more fun, calculated field 1 is referenced in calculated field 2 and so forth. Here’s the formula in simple English: IF Ext. Field Case <=0, then put 0; otherwise, do (QTY Allocated / Case Pack) rounded Here’s how it looks in report writer: image Here’s what it says in the False Case box: SOP_Line_WORK. QTY Allocated / STR_LNG(FUNCTION_SCRIPT(rw_TableHeaderString 3107 '”CONTAINERQTY” IV_Item Number 0 2))) Some key things to remember: 1.Result Type for Extender fields always have to be String 2.When you reference an Extender filed in a calculated field -Convert the extender field to an integer utilizing one of the STR_Integer functions -Result type always have to be with a currency or an Integer. -If you need to reference this calculated field in another calculated field, then make sure that your Result type is Currency GOOD LUCK!