1 Reply Latest reply on Jun 21, 2015 7:42 AM by philmodjunk

    List report using GetSummary(xx;part) in all other layout parts

    Stu412

      Title

      List report using GetSummary(xx;part) in all other layout parts

      Post

      I have a list report I'm building which requires percentages to be shown on each row.  The data table has many rows each one belonging to a what eventually is a layout part (Income, North, East, South, West).

      The report shows total income at the top (as a part based on the name 'Income) with other parts beneath showing expenses (based on the names North, East, South, West).  Each part has many rows within it contributing to the total expense for the area.

      This was pretty easy to set up and display the data in the columns I needed.  

      I now am struggling to display percentages which unfortunately is not a simple as just expense/income due to all the summarising required.  I need to show the row by row values with a percentage of income in each area, ie, expenses as a percentage of income.

      The problem is the income figure.  I can calculate it using "If BreakField="Income"'GetSummary(Total;BreakField)"  The issue here is that FM will place the result on the first part (simply because it is Income), but it will not calculate this on the other parts because they're not Income.

      This means that on the other parts, there's a zero value when I look to do the percentage calculation which then fails.

      So, how do I get a consistent figure from Part 'Income' to appear on all other parts in a list layout report so I can use it in calculations against other part figures??

      Thanks 

        • 1. Re: List report using GetSummary(xx;part) in all other layout parts
          philmodjunk

          Apparently, you have a sub summary layout part with "when sorted by income".

          Do you then have at least one other sub summary layout part based on a different field? Such as location or region that results in groups of records for North, East, South, and West?

          With sorting already grouping your records for sub summary parts, I don't see the reason for using the If functions.

          I would think that GetSummary ( SummaryField ; BreakField ) would be all that you need. When the value of BreakField is "income" the subtotal returned by this field will be based on the group records where BreakField = "income". When the value of BreakField is a different value, you get a different subtotal based on that value.

          But then there is this statement:

          This was pretty easy to set up and display the data in the columns I needed.  

          Subsummary layout parts organize data into rows, not columns so I find myself wondering if you are trying to list sub totals in a row with sub total computed from a different group of records--that is something that cannot be done with getSummary and needs a different method.

          So I suggest taking another swing at describing the format of your report.