genevaers / Run-Control-Apps

GenevaERS Run Control
Apache License 2.0
0 stars 2 forks source link

RCG generates incorrect offsets for no aggr Reports #60

Open ghannington opened 4 months ago

ghannington commented 4 months ago

A Report view with no FRA, and 'As Data' set for both sort keys (i.e. no aggregation in MR88) creates DTEs in the XLT but with incorrect offsets. It looks like it's getting confused that it doesn't have CTEs. See SAFRWBGD, Env 795, View 12200.

Generated on 2024-07-19 0:0:0                                                                   
       1     0 HD                                                                               

       2     0 RENX  10201                                                                      
------------                                                                                    
View 0012200                                                                                    
------------                                                                                    
       3     0 NV   DETAIL  LR=10243 SKA=20, STA=0, DTA=12, CTC=0 Source Number=1               
       4     1 SKE    10201   10243  400584   11  10 X (U/0,0 NONE)  ->     1  10 X (U/0,0 NONE)
       5     2 SKE    10201   10243  400583    1  10 X (U/0,0 NONE)  ->    11  10 X (U/0,0 NONE)
       6     3 DTE    10201   10243  400590   32   6 P (S/0,2 NONE)  ->     1   6 P (S/0,2 NONE)
       7     4 DTE    10201   10243  400591   38   6 P (S/0,2 NONE)  ->    14   6 P (S/0,2 NONE)
       8     0 WRXT Dest=Extract                                                                
       9     0 ES   10201                                                                       
      10     0 EN                                                                               
ghannington commented 4 months ago

Just a note that MR91 has the same error

ghannington commented 4 months ago

Just as an extra note, it doesn't seem to matter if the sort keys are set as 'As Data' or 'Categorize', or 'Print' or 'Print Suppress', the problem seems to happen when:

It used to be that the Group Aggregation Function could be blank, so avoid this error, but now blank is not allowed. That is another question for debate - should we allow the Group Aggregation Function to be blank again?

ghannington commented 4 months ago

Another piece of information - GVBMR88 expects numeric columns to be in CT columns, if any subtotaling function (record or group) is specified. If the compiler generates DT columns only, and there is a Group Aggregation Function set, then MR88 will return all zeros, because it's trying to use CT columns that aren't there. MR88 should probably handle this better, with at least an error message.