Buy Now
Sign in

Grouping table data

cmwincom , October 02 2019, 18:47
C
cmwincom 18
October 02 2019, 18:47 #389389
I have a simple table of tournament results. Each row of data contains the following fields: Round, Division, Place, Competitor. I need my table to display the data grouped first by the round and then within the round by division. How can I accomplish this? I've included a link to an image of what I'm looking to do.
http://challenge.gemakarate.com/images/chrono/results2.png
healyhatman 8
October 02 2019, 22:05 #389391
You'll have to do the table's HTML yourself in PHP.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
C
cmwincom 18
October 03 2019, 14:49 #389404
I'm sorry, but that reply is useless. Yes I could use HTML and create the table manually and have it look exactly the way I want to. Why do that when potentially hundreds of rows of data can be stored in a table and a powerful component like CC can be used to display the data in the desired form? There should be a way to do such grouping and sub-grouping so that data does not need to be repeatedly displayed. I shouldn't have to create multiple copies of the same connection and changing the Where condition for each one.

Within CC6 there are many tools available and so little documentation supporting those tools and so few examples of how to use them.
healyhatman 8
October 03 2019, 14:54 #389405
If you want to group it by one thing, you can group it in your read data action. You may even be able to group it with subgroups in the way you want, but I don't think so.
But it doesn't matter, because the table display can't display the grouped data the way you want it. You're going to have to make the table yourself. To get the data as a subgroup instead of iterating and checking previous values you'll probably even have to write the SQL query yourself.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
GreyHead 64
October 04 2019, 08:29 #389416
Hi cmwincom,
I'm no expert in CCv6 but as far as I know there is nothing built in to handle rowspans - which are what you need here. It's possible that you could do something with Custom code in CCv6 to handle that - somewhere here there is a much simpler example doing custom row colouring. But here I'm with healyhatman, it will be much simpler to build this with custom code in a ChronoForm. There you can use the array sizes in the data to set the rowspan sizes.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much