Title: | FOCUS, from INFORMATION BUILDERS |
Moderator: | ZAYIUS::BROUILLETTE |
Created: | Thu Feb 19 1987 |
Last Modified: | Mon May 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 615 |
Total number of notes: | 1779 |
I need some help on subtotaling. I've created a report that has information on cost center data and I'm having a difficult time subtotaling. My report is broken down into different levels such as Direct Labor - 01, Indirect Labor - 02, etc. What I need to do is after Level 11 I want to print a sub-total for levels 1 -11. This is no problem. Then, I need a subtotal after level 12, which is a sub-total for levels 1 - 12. And finally I need a sub-total for levels 1-99. My problem has been with the subtotaling. I can get the 1-11 subtotal fine, and the 1-99 since I just print the values in a subfoot when a break occurs. I have yet to find a way to print a correct subtotal for level 12. I have tried assigning a code to levels 1 - 11 as 01, 12 as 02, and 13 - 99 as as 03 but even then when I subfoot, the values are zeroed out. I've tried using CT but that doesn't work since I don't want to carry a current total to the end of the report, just to the end of the break. I've pretty much run out of ideas since I've called the Dallas hotline and there's no help there. My current fex is using ST for the subtotaling. Any ideas out there? Thanks a lot for your help, Victor
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
110.1 | try FRL - Financial Reporting Language | GVA02::BACH | Ray Bach @GEO - DTN 821-4631 | Wed Aug 10 1988 04:35 | 13 |
Take a look at using FRL - Financial reporting Language. The main problem with the FRL approach is that you have to lay out the report rows in a fex instead of just using the data in the file to generate the report. This way you determine when you want to total and what is in the totals. You do this by assigning labels to the rows. The approach works well but leaves you with the problem of maintaining the layout of the report. regards | |||||
110.2 | It's the Technique.. | FR0002::DADDIECO | A WORD IS NOT RECOGNIZED: | Wed Aug 10 1988 10:40 | 35 |
Victor, Seeing your report and master description would help a lot! In absence of the above, sorting by appropriately defined fields may by what you are looking for: DEFINE FILE L1_11/I1 = IF LEVEL LE '11' THEN 0 ELSE 1; L1_12/I1 = IF LEVEL LE '12' THEN 0 ELSE 1; L1_99/I1 = IF LEVEL LE '99' THEN 0 ELSE 1; END TABLE FILE SUM COST BY L1_99 NOPRINT BY L1_12 NOPRINT BY L1_11 NOPRINT SUB-TOTAL BY LEVEL END or..... (if noprint suppresses the subtotals) TABLE FILE SUM COST BY L1_99 NOPRINT BY L1_12 NOPRINT BY L1_11 NOPRINT BY LEVEL ON L1_99 SUBTOTAL ON L1_12 SUBTOTAL ON L1_11 SUBTOTAL END Good luck, -John | |||||
110.3 | And a lot more... | DEC25::LEBARIO | Fri Aug 12 1988 00:00 | 32 | |
Thanks for the responses. I'll be looking to try .2 to see if I can get that to work, without knowing FRL I'll have to dig around to understand how that works. After bugging the Dallas Hotline for some time, they gave me a 'trick' command which I've never seen before to do the subtotaling on my own. 1. Define a field in where the data will stored and also use the following syntax temp_field/FORMAT=if sort_break = last sort_break then temp_field + actual_data else actual_data 2. Then, somewhere in any of the verbs in the request - Print, Sum, place the temp_field value there with with the noprint qualifier. This allows the variable to be subtotaled. SUM ... . TEMP_FIELD NOPRINT 3. Finally, whenever I want to make my subtotal, I move it into a subfoot and it gets initialized only when my sort break value changes ON SORT_BREAK SUBFOOT "<TEMP_FIELD" This did the job, but I have looked through the documentation for the LAST command and can't find it anywhere. Victor |