ro_det query

herka

New Member
Hi all,

I'm newbie in Progress.
I must to make a query but i don't know how.
For me needed some data from the ro_det in group.
I want to see the

ro_routing, (in group)
ro_op,
ro_wkctr,(by the first four digits is the foundation of grouping)
ro_desc,
ro_setup, (to sum)
ro_run (to sum)

Example:
Code:
ro_routing  ro_op  ro_wkctr ro_desc  ro_setup ro_run
99911212   10      6655xxx  Example    10          2
99911212   20      6655xxx  example2   4           1
Total:                                 14          3
How can i made it?

Thanks for all helps!
 
Something to start with. You say sum of ro_setup and sum of ro_run, dont know if you want it broken down by ro_routing or just a total.

Code:
def var vro_setup like ro_setup no-undo.    
def var vro_run   like ro_run   no-undo.    
                                            
form                                        
   ro_routing ro_op ro_wkctr ro_desc        
   ro_setup   ro_run                        
with frame a 20 down.                       
                                            
for each ro_det no-lock  by ro_routing :    
  display ro_routing ro_op                  
     substring(ro_wkctr,1,4) @ ro_wkctr     
     ro_desc ro_setup ro_run                
     with frame a.                          
  down with frame a.                        
  assign                                    
  vro_setup = vro_setup + ro_setup          
  vro_run   = vro_run  + ro_run.            
end.                                        
display "TOTAL" @ ro_routing              
        vro_setup @ ro_setup              
        vro_run   @ ro_run with frame a.
 
Back
Top