5 Replies Latest reply: May 15, 2014 9:57 AM by Grant Perkins RSS

    Finding Records without a detail trap?

    Nick Osdale-Popa

      Here's my report layout:

      [font="courier"]                                             FOR PAYROLL PERIOD ENDING DATE 10/07/05             USER EMP SECURITY TYPE:       ALL    

                                                              FOR ALL EMPLOYEES                                                             

      EDIT LIST:  10 BATCH: TIME                                                                               

      CHK  TR  JOB/    PH/ COST CD/ ST/ SU DBLWC TRD UNION/   SK LEV/ COMP/ REIMB AMT/ -


      HOURS----


               REG      PAY    

                 DATE    CERT DAYS EEO LOC ST ST ST BNK SUPER    LAB CAT EARN REIMB ACCT     REG        OVT     DBL        RATE                                                                               

      12345    EMPLOYEE, JOE A.          GRP:       HOME ST/LOC: CA/          /          /           ST/LOC: 1/1/ /  SUTA/DBL/WC: E/E/E     

                                         DIR DEP: N                                                                               

      1   1  12.345   N4 20HHW    CA  CA CA CA OP  SOCALPT  5THYAP  5187X      0.00   16.00       2.00    0.00     23.2300   929.20    

                 10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                                               

      SAT     SUN     MON     TUE     WED     THR     FRI                                                                   

               R:    0.00    0.00    0.00    0.00    0.00    8.00    8.00                                                                   

               O:    0.00    0.00    0.00    2.00    0.00    0.00    0.00                                                                               

      2  12.345   99 0002     CA  CA CA CA OP  SOCALPT  5THYAP  5187X     10.50   10.00       0.00    0.00     23.2300     0.00    

                 10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                     /font[/quote]my detail trap is on the hours (R:[/b]), trap characters: ßÃ:ß[/b]

       

       

      In the system when the user enters hours, they have the option to either enter total hours, or spread the hours over the week.  In line 1 above, the 16 Reg Hours and 2 Ovt Hours have been entered in the appropriate days.  In line 2 above the 10.50 Reg Hours have not been spread out.

       

      Other notes about the report: The employee can have any combination of Reg, Ovt, & Dbl time. If all three types of times are included, they'll have a line for each. If they only have 1 type, they will only have that type listed.

       

      The model I described above works fine.  I'd like to create a model that will show those hours that HAVE NOT been spread out (ie, missing the SAT - FRI fields). Any ideas?

       

      This is using ver 7.

        • Finding Records without a detail trap?
          Grant Perkins

          Originally posted by Nick Osdale-Popa:

          The model I described above works fine.  I'd like to create a model that will show those hours that HAVE NOT been spread out (ie, missing the SAT - FRI fields). Any ideas?

           

          This is using ver 7. /b[/quote]Nick,

           

          Are you seeking to include the non-detailed lines in the same output as the detailed lines or is this a new model running on the same report creating its own data table from its own process?

           

          Grant

          • Finding Records without a detail trap?
            Nick Osdale-Popa

            Either or will be fine. A new model seems best, though.

            • Finding Records without a detail trap?
              Grant Perkins

              If record 1 had no detail lines (No R:, O:, et al) How many lines would there be , minimum, between the end of the record (2 lines on the report?) and the start of the next record (Record 2 line)?

               

              How many Sat to Fri row types can there be maximum and how many are there in practical terms, again maximum, if different to the absolute max available?

              • Finding Records without a detail trap?
                Nick Osdale-Popa

                My report is 378 pages, so it's tough finding a record with out the hours broken out (R,O,D).  From what I can tell, if there are no hours, then there are no blank lines between the two records like so (using the data from my example):

                 

                [font="courier"]12345    EMPLOYEE, JOE A.          GRP:       HOME ST/LOC: CA/          /          /           ST/LOC: 1/1/ /  SUTA/DBL/WC: E/E/E     

                                                   DIR DEP: N                                                                               

                1   1  12.345   N4 20HHW    CA  CA CA CA OP  SOCALPT  5THYAP  5187X      0.00   16.00       2.00    0.00     23.2300   929.20    

                           10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                    

                         2  12.345   99 0002     CA  CA CA CA OP  SOCALPT  5THYAP  5187X     10.50   10.00       0.00    0.00     23.2300     0.00    

                           10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                     /font[/quote]The maximum would be 3 - one line for Reg, Ovt, and Dbl:

                 

                [font="courier"]12345    EMPLOYEE, JOE A.          GRP:       HOME ST/LOC: CA/          /          /           ST/LOC: 1/1/ /  SUTA/DBL/WC: E/E/E     

                                                   DIR DEP: N                                                                               

                1   1  12.345   N4 20HHW    CA  CA CA CA OP  SOCALPT  5THYAP  5187X      0.00   16.00       2.00    2.00     23.2300   929.20    

                           10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                                               

                SAT     SUN     MON     TUE     WED     THR     FRI                                                                   

                         R:    0.00    0.00    0.00    0.00    0.00    8.00    8.00                                                                   

                         O:    0.00    0.00    0.00    2.00    0.00    0.00    0.00                                                                   

                         D:    0.00    0.00    0.00    2.00    0.00    0.00    0.00                                                                               

                2  12.345   99 0002     CA  CA CA CA OP  SOCALPT  5THYAP  5187X     10.50   10.00       0.00    0.00     23.2300     0.00    

                           10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                                /font[/quote]A typical line is usually[/i] just Regular Time:

                 

                [font="courier"]12345    EMPLOYEE, JOE A.          GRP:       HOME ST/LOC: CA/          /          /           ST/LOC: 1/1/ /  SUTA/DBL/WC: E/E/E     

                                                   DIR DEP: N                                                                               

                1   1  12.345   N4 20HHW    CA  CA CA CA OP  SOCALPT  5THYAP  5187X      0.00   16.00       0.00    0.00     23.2300   929.20    

                           10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                                               

                SAT     SUN     MON     TUE     WED     THR     FRI                                                                   

                         R:    0.00    0.00    0.00    0.00    0.00    8.00    8.00                                                                               

                2  12.345   99 0002     CA  CA CA CA OP  SOCALPT  5THYAP  5187X     10.50   10.00       0.00    0.00     23.2300     0.00    

                           10/07/05 Y   0.00 AP               FE           PI      HR        15040                                                       /font[/quote]Also, in looking at my original post, the 10 hours are not spread out for the week. I mistyped the hours of 10.50.

                • Finding Records without a detail trap?
                  Grant Perkins

                  Nick,

                   

                  If we had a few spare lines to play with I would have been suggesting a look at using the vertically floating field idea based on the preceding string field property using O:, R: and D: as the strings. But you would need 2 clear lines after anything you want to extract from the 2 lines that always appear.

                   

                  So I don't think that will run.

                   

                  If you could be sure to be using V8 it might be interesting to consider picking every record as a multi-line field - so anything between 2 and 6(?) lines - and then slice and dice the lines into fields perhaps making use of the new V8 Textline function maybe.

                   

                  Or possibly simply re-format the entire report to make all records 6 lines long (blank if nothing to report) and then export the result to run a model using the preceding string field selection option.

                   

                  But I suspect it might be easier to simply run an initial model to pick only the Sat to Fri fields and a key for use as a lookup. Export the result then run a second model to pick the primary fields from the 'always present' lines and lookup the daily breakdown records when they occur.

                   

                  Wrap the whole thing into a bit of your handy code and nobody will know there are any joins!         

                   

                  Does this make sense?

                   

                  Grant