1 / 52

Atomic Context: The Key to Flexible Sub Summary Reporting

San Mateo Staff Meeting, Nov 28, 2007. Atomic Context: The Key to Flexible Sub Summary Reporting. Jeremiah Small. Atomic?!. (more later) But first…. A Simple Example. A Simple Example. No, seriously. It’s not as big a mess as it looks…. A Simple Example. Requirements:

mave
Download Presentation

Atomic Context: The Key to Flexible Sub Summary Reporting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. San Mateo Staff Meeting, Nov 28, 2007 Atomic Context:The Key to Flexible Sub Summary Reporting Jeremiah Small

  2. Atomic?! • (more later) • But first…

  3. A Simple Example

  4. A Simple Example No, seriously. It’s not as big a mess as it looks…

  5. A Simple Example Requirements: 1. Report on various tables (at least 3) 2. Extract totals from 2 date ranges • Actual range as defined by user • Same range in the previous year 3. Show the % change between ranges and the % of the total for each range

  6. Report: Rep Sales Totals

  7. Report: Products by Class

  8. Report: Products by Class then Rep

  9. Report: Business Types by Territory

  10. Report: Locations by Type then Rep

  11. Report: Locations by Rep

  12. Report: Products by Location

  13. Report: New Locations by Territory

  14. An Example Solution

  15. So what about atomic context?! • Oxford American Dictionary a-tom-ic: of or forming a single irreducible unit or component in a larger system. • Disambiguation NOT used as in the same sense as an atomic operation in computer science which refers to a set of operations that can be combined so that they appear to the rest of the system to be a single operation with only two possible outcomes: success or failure.

  16. So have I been misleading you?

  17. What is the atomic context here?

  18. These all run from Invoice Line context

  19. But how can that be? 1. We don’t see Invoice Line items in reports 2. We need to extract 2 date ranges • Actual range as defined by user • Same range in the previous year 3. We need to compare values between ranges

  20. 1. No rule that you must display body

  21. 1. No rule that you must display body

  22. 2. Conditional atomic values

  23. 2. Conditional atomic values

  24. 2. Conditional atomic values

  25. 2. Conditional atomic values

  26. 2. Conditional atomic values

  27. 2. Conditional atomic values

  28. 2. Conditional atomic values

  29. 2. Conditional atomic values So conditional atomic values let us do this…

  30. 3. Doing math on Summary values …but what about this?

  31. 3. Doing math on Summary values

  32. 3. Doing math on Summary values

  33. 3. Doing math on Summary values What’s the catch? The break field in a GetSummary function… MUST BE LOCAL

  34. 3. Doing math on Summary values

  35. 3. Doing math on Summary values The break field in a GetSummary function must be local?! …bummer :-( …but wait! Nobody said it can’t be a calc field! The trick? Bring all your break fields to the atomic context as calc fields.

  36. 3. Doing math on Summary values Bring all your break fields to the atomic context as calc fields. Bonus: You can add some logic to your break fields.

  37. 3. Doing math on Summary values Note: You can sort by the same summary field or a constant to get Grand Summary values.

  38. 3. Doing math on Summary values GetSummary () with localized break fields lets us do this $50,826.32 ÷ $1,546,456.07 = 3%

  39. 3. Doing math on Summary values GetSummary () with localized break fields lets us do this Let ( [ cur = GetSummary( _il_cur_AVG_price_sm ; _ct_RepName ) ; pre = GetSummary( _il_pre_AVG_price_sm ; _ct_RepName ) ]; Case ( cur ≤ 0 ; "" ; pre ≤ 0 ; "" ; cur > pre ; ( cur / pre - 1) ; pre > cur; ( pre / cur - 1 ) * -1 ; 0 )//endCase )//endLet

  40. 3. Doing math on Summary values GetSummary () with localized break fields lets us do this ($249,320.79 ÷ $50,826.32 -1 ) x -1 = -391%

  41. …but it’s not just for FileMaker Sub-summarize records on a Web page First record

  42. …but it’s not just for FileMaker First group Sub-summarize records on a Web page

  43. PHP Sub Summary Do one query, not seven

  44. PHP Sub Summary Do one query, not seven

  45. PHP Sub Summary Do one query, not seven

  46. PHP Sub Summary Do one query, not seven

  47. PHP Sub Summary Remember the break field for Sub Summaries?

  48. PHP Sub Summary Remember the break field for Sub Summaries?

  49. PHP Sub Summary With records grouped by a break field, nested loops can print them to the screen just like FileMaker sub summaries

  50. PHP Sub Summary 1st group Sub-summarize records on a Web page First record Second record Third record Second group And so on…

More Related