• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Implementing a pivot table / cross table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing a pivot table / cross table


  • Subject: Re: Implementing a pivot table / cross table
  • From: Jean-François Veillette <email@hidden>
  • Date: Fri, 17 Mar 2006 07:18:18 -0500

I first used WOnder's DynaReporting frameworks, which worked as expected.

But it was a bit heavy weight for my simple needs, so I re-implemented the core of it, all in a single class.
All it does is take a population and segment it based on the dimensions you ask for.
The result you get is a HashMap where keys are the dimensions and the combination of values found in those dimensions and values are NSArray of the population that fit in that segment.
For example, If you give it a population of 'People' and you ask to segment on 'sex' and 'age', you will get a hashmap that looks like (key-value):
'sex' -> ('M', 'F') // all the possible values it found in the population for the key 'sex'
'age' -> (10, 21, 22, ...) // ...
{'sex', 'M'} -> (John, Marc, ...) // a list of all the boys
({'sex', 'F'}, {'age', 10}) -> (Julie, Marie) // all the girls, with age = 10.
... (you get the idea) ...


Once you get this 'model', you just have to use combinations of wo-repetitions to display it in a nice table format.
I used it once to normalize values in my bd, giving it a population of 6000+ objects and segment on 6 dimensions (or something like that), It worked just fine. My usual use case are with population of about 10 objects, segmenting on 2 dimensions (sex and age).


If DynaReporting feels too heavy weight and/or want to try my class, send me a note, I'll send it.

- jfv

Le 06-03-17, à 03:44, Rico Landefeld a écrit :

hi all,

'll have to implement an cross table. is there anyone out there who did this with wo before? any suggestions ? i think i'll need much more controll over the sql. is it better to implement it completely with jdbc or should i use raw sql.

regards,
rico

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Implementing a pivot table / cross table
      • From: Rico Landefeld <email@hidden>
References: 
 >Implementing a pivot table / cross table (From: Rico Landefeld <email@hidden>)

  • Prev by Date: Re: deployng trouble, can you help me?
  • Next by Date: Re: Implementing a pivot table / cross table
  • Previous by thread: Re: Implementing a pivot table / cross table
  • Next by thread: Re: Implementing a pivot table / cross table
  • Index(es):
    • Date
    • Thread