6 Replies Latest reply on Apr 14, 2012 10:08 PM by sandyabbott_1

    justify/align calculation field results to fill field width

    JamesGabbani

      Title

      justify/align calculation field results to fill field width

      Post

      Attached is a layout for a show guide I produce. The last line on each of the wines (records) is a single calculation field that ensures the right prices are applicable to each record. As you can see some records use 5 prices and others use 2 prices.

      The prices need to be laid out in such a way that the first price is justified left and the last price is justified right with any other prices to be set evenly between the two.

      The question is how to either, set the field to spread the results of the calculation field or to develop the calculation to lay it out for me. I suspect the calculation field is the only way to go.

      I've tried using tabs but given the number of permutations, not to mention the differing nos of characters in the prices, it isn't possible to organise the tabs.

      Hope someone can help. It's one of those ones that has really stumped me and maybe I just can't see the wood for the trees?

      Please see the calculation (as you can see I'm using spaces but it is far from perfect):

      If(${NORMAL IN STORE RSP} = ${IN STORE PROMOTIONAL PRICE};

      If(Length (${NORMAL IN STORE RSP});"Usual Instore: " & TextStyleAdd ( "£" & ${NORMAL IN STORE RSP} ; Plain ) & "                        ";"") & 

      If(Length (${NORMAL Bott PRICE});"Usual TWC: " & TextStyleAdd ( "£" & ${NORMAL Bott PRICE} & "                   "; Plain ) & "                         ";"") & 

      If(Length (${_PRICE___BOT__5%__or_PROM_PRICE});"Current TWC: " & TextStyleAdd ( "£" & ${_TWC_PRICE___BOT__5%__or_PROM_PRICE}  & "                    "; Plain ) & "                   ";"") & 

      If(Length (${SHOW BOT PRICE _15%_});TextStyleAdd ( "Buy Today: £" & ${SHOW BOT PRICE _15%_} ; Bold ) & TextStyleAdd ( "(btl) " ; Plain );"") &

      If(Length (${SHOW CASE PRICE _15%_});TextStyleAdd ( "£" & ${SHOW CASE PRICE _15%_} ; Bold ) & TextStyleAdd ( "(case)" ; Plain );"");

      If(Length (${NORMAL IN STORE RSP});"Usual Instore: " & TextStyleAdd ( "£" & ${NORMAL IN STORE RSP} ; Plain ) & "             ";"") & 

      If(Length (${IN STORE PROMOTIONAL PRICE});"Current Instore: " & TextStyleAdd ( "£" & ${IN STORE PROMOTIONAL PRICE} ; Plain ) & "             ";"") & 

      If(Length (${_PRICE___BOT__5%__or_PROM_PRICE});"Current: " & TextStyleAdd ( "£" & ${_PRICE___BOT__5%__or_PROM_PRICE} ; Plain ) & "             ";

      "                                 Current TWC: " & TextStyleAdd ( "£" & ${NORMAL Bott PRICE} ; Plain ) & "                                   ") & 

      If(Length (${SHOW BOT PRICE _15%_});TextStyleAdd ( "Buy Today: £" & ${SHOW BOT PRICE _15%_} ; Bold ) & TextStyleAdd ( "(btl) " ; Plain );"") &

      If(Length (${SHOW CASE PRICE _15%_});TextStyleAdd ( "£" & ${SHOW CASE PRICE _15%_} ; Bold ) & TextStyleAdd ( "(case)" ; Plain );""))

      Screen_shot_2010-09-25_at_16.10.55.png