Print Page | Close Window

Grouped Records

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=14160
Printed Date: 22 June 2024 at 10:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Grouped Records
Posted By: Algae
Subject: Grouped Records
Date Posted: 27 April 2009 at 4:32pm
Does anyone know of a good method to create a combined record based on grouped columns?

For instance, records (rows) are grouped on column 1 and 2:

Col 1
______
         | Col 2
         |______


         Col 1 | Col 2 | Col 3 | Col 4
         -------------------------------
Row 1|   A    |   B    |    C   |   D
--------------------------------------
Row 2|   A    |   B    |    E    |   F


a) I want to create a new record when any Rows are grouped.
Example when: (Row 1, Col 1) == (Row 2, Col 1) && (Row 1, Col 2) == (Row 2, Col 2).
My method of finding the first grouped row is pretty convoluted where I have to test all the columns against the ordered column list and so on. Making a new record based on the found row is a simple process of copying the found row record to a new record.

The result should be: New Record (A, B, C, D)

b) Now I want to append whatever doesn't match from Record 2 to this new record!

The result should be New Record (A, B, C, D, E, F)

It seems like it should be simple, but I've really ended up with quite a mess trying to get the collection of rows under the same "grouped by" column(s). Is there an easy method to grab all the rows under a Grouping? Digging through the code I've found the CXTPReportColumnOrder which gives me the ordered column list, but nothing to indicate which rows or records are indeed Grouped.

Thanks in advance for any tips on how to accomplish this.





Replies:
Posted By: Algae
Date Posted: 29 April 2009 at 1:42pm
Ok.. I'll simplify my question:

Is there a method to get the grouped rows (or records) under a group row? The group row being the one with the +/- box. 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net