Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • sorry for the late reply, i've tested the code and it works, but how can i get the subtotal and grand total? Commented Jul 31, 2014 at 3:37
  • @Ion Do you mean totals for the rows to the right, totals for the columns at the bottom and a grand total in the bottom right corner? You can use more map keys e.g. rm.Origin + '-origin-total', rm.Status + '-status-total', 'grand-total' and sum them in the controller loop and add them to the Visualforce. Commented Jul 31, 2014 at 6:58
  • thanks keith, just one more problem is if the record is null (e.g. origin=email w/ status=closed) the visualforce show error "Map key Email-Closed not found in map", how can i resolved this? Commented Jul 31, 2014 at 7:27
  • @Ion See "PS" added to answer. Commented Jul 31, 2014 at 8:22