1 Reply Latest reply on Mar 2, 2012 8:53 AM by philmodjunk

    Help With An Old Calculation

    MatthewMackay

      Title

      Help With An Old Calculation

      Post

      I currently have a calculation in place that's helps with the formatting of my reports;

      Let ([ Litem = Length (Report Item);

      LDescrip = Length (Report Description);

      LComments = Length (Report Comments) ];

      Case (Litem ≥ LDescrip and Litem ≥ LComments; Report Item; LDescrip ≥ Litem and LDescrip ≥ LComments; Report Description; Report Comments) )

       

      It basically calculates which field out of the 3 has the most characters and sets the other 2 to that length. The 3 fields are displayed in a single row on the report.

       

      I've attached an image of an example when this doesn't quite work, usually due to carriage returns making a field larger but still containing less characters. It's a very minor issue but I'm just trying to tidy up my reports.

       

      Let me know if you have any ideas.

       

      Cheers

      Screen_shot_2012-03-02_at_16.13.28.png

        • 1. Re: Help With An Old Calculation
          philmodjunk

          It basically calculates which field out of the 3 has the most characters and sets the other 2 to that length.

          It does? As I read that calculation it returns the contents of the field with the most characters.

          How do you use this field to control the format of your report?

          PatternCount can use ¶ to count the number of returns in your report but any calculation that counts characters and returns is not going to perfectly predict the "tallest" field due to the proportional fonts used.