Hoppa till huvudinnehållet

Report Designed: Calculating sum of percentages

Kommentarer

5 kommentarer

  • Permanently deleted user

    Hi Chris,

    There is no way to calculate the overall percentage only using the individual percentages, since you need them weighted by their Total size. Rather than basing the overall percentage off the individual percentage values, can you calculate it with the summed values? Something like:

    =SUM(Vacant) / SUM(Total)

    0
  • Chris Dunlop

    Hi Paul.  I ended up adding a GroupFooter BeforePrint function.  In there, I grabbed the values from the Total Acres textbox sum and the Vacant Acres textbox sum (in the group footer), and did the calculation.  I then assigned the results to a textbox.

    The only thing I'm not sure about is that by grabbing the textbox values from the Total Acres and Vacant Acres summaries, I then needed to convert them to doubles for the calculation.  Seems to me I should be using the raw sum values, not the formatted string values.  I wasn't sure exactly how to access the raw sum values though.

    Thanks,

    Chris

    0
  • Permanently deleted user

    Hi Chris,

    I was unable to find a better solution than what you suggested. Summary fields in Active Reports don't seem to have a built-in way to handle weighted averages.

    0
  • Chris Dunlop

    Thanks for looking into it Paul.

    I ended up setting up a series of invisible "dummy" text boxes in the group footer that stored the full double value of the sum of each column.  I used these to calculate the percentages.

    I'm surprised there's not a straight forward way of calculating overall percentages in ActiveReports...

    Chris

    0
  • Robert Pincus
    Can someone provide a sample report? I have the same problem and I can't figure out how to get the summarized values to calculate the percentages.

     

    Robert
    0

Du måste logga in om du vill lämna en kommentar.