Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping Not (Yet) Working

Status
Not open for further replies.

MikeCopeland

Programmer
May 21, 2007
91
US
Using CRXI...
I cannot seem to get the Grouping I need to eliminate multiple sets of detail lines: I can't eliminate the duplicate detail lines...and that's causing errors in various subtotal lines. <sigh...>
Here is another attempt to explain my data:
----------------------------------------------------------
T1 T2 T3 T5 T5
Name Goal Date Ind Fam
ClientA 1 06/13/07 60 0
ClientA 2 06/13/07 0 30
ClientA 1 06/21/07 60 0
ClientA 2 06/26/07 0 90
ClientA 1 06/29/07 60 0
----------------------------------------------------------
The output I'm getting is:
ClientA 1.00 06/13/2007
ClientA 0.50 06/13/2007
ClientA 1.00 06/21/2007
ClientA 1.50 06/26/2007
ClientA 1.00 06/29/2007
ClientA 1.00 06/13/2007 !!
ClientA 0.50 06/20/2007 !!
ClientA 1.00 06/21/2007 !!
ClientA 1.50 06/26/2007 !!
ClientA 1.00 06/29/2007 !!

ClientA 6.00 4.00 // subtotal line
----------------------------------------------------------

The multiples are a result of my required SQL query selection of T2.Goal values of 1 & 2 - which is my problem. I _must_ look at and compute with T5.Ind and T5.Fam, which correspond to T2.Goal=1 and T2.Goal=2. Doing so produces the duplicates and doubles the running totals I print in the subtotal line: these values should be 3.00 & 2.00. I am Grouping on T1.Name...
Furthermore, although I can adjust the subtotal line to display the correct values, I have to display (1 set of) the detail information, to help the report's users to see where planned therapy is not being done. That is, merely showing the correct subtotal information for each client doesn't show enough information for this report.
Also, there is nothing in the T2 table that I can use to further qualify the query other than Goals 1 & 2. The report linkage I have is unique until the T2 records, where linkage to T3 and T5 tables accesses to the Date and Ind/Fam values needed to select and calculate my totals. (Note that the values in the database are in Minutes, but I'm displaying the Detail and SubTotal information in Hours.)
Bottom line: I want whatever this report prints to NOT SHOW the detail lines with the "!!" (my addition for illustration here), as well as NOT SEE the data that passes through during the "WhileReadingRecords;" cycle. I've been told here that this is simple (?) with Grouping, but nothing I've tried so far has worked - and the proper way to Insert such Grouping has eluded me so far...
Please advise. TIA
 
This is my first attempt at helping and I am a bit timid about it for some reason but here goes:

Group by
T1.name
T3.date
T2.Goal
move your T1.name field and T3.date field and T2.goal field into the T2 Goal Footer section.
Summary add the T5.In and T5.Fam to the T2 Goal Footer section and then suppress or hide the detail section. You may want to hide other sections (T1.Name and T3.date header and footer) as well
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top