2 Replies Latest reply: May 15, 2014 9:56 AM by Bill_Mc _ RSS

    Trapping variable values

    Bill_Mc _

      Hello,

           Trying to create a trap that will capture all the data for group ####.  The problem I am having is that the model is built on the max number of variables (Group 1100).  Group 1100 has data for ABC and XYZ, while 1200 only has data for ABC.

       

      GRP: 1100 

      ABC

      Bus     13,224                    

      Total ABC     13,224

       

      XYZ     

      Bus     6,850          

      Total XYZ     6,850

      Date: 01/01/01

       

       

      GRP: 1200

      ABC

      Bus     12,000                    

      Total ABC     12,000

      Date: 01/01/01

       

      When the model is run, it is capturing the data from group 1100 XYZ values and adding them to group 1200.

       

      Any assistance would be greatly appreciated!

       

      Thank you!

       

      Bill

        • Trapping variable values
          Data Kruncher

          Hi Bill.

           

          While there may be a more elegant solution for you, this is somewhat straightforward (hopefully   ).

           

          Trap the two lines showing ABC and Bus 13,224 as a detail template. Set "Trap on Line 2" and trap the word Bus. Define ABC as a field, and 13,224 as a field.

           

          Trap your GRP line as an append template. This will add the GRP to each detail record.

           

          Trap your Date line as a footer template. It must be a footer because it appears after the detail record in the report.

           

          That should do it for you. Please do let us know how you make out.

           

          Regards,

          Kruncher

          • Trapping variable values
            Bill_Mc _

            Thank you for that idea!

             

            The output I now receive is:

            Grp  Type  Bus   Date

            1100 ABC   13224 1/1/2001

            1100 XYZ    6850 1/1/2001

            1200 ABC   12000 1/1/2001

             

            I was trying to generate an output of:

            Grp   ABC    XZY     Date

            1100  13224  6850    1/1/2001     

            1200  12000  <Null>  1/1/2001

             

            I was making the solution way to complicated.   smile.gif[/img]  

             

            Thank you for your time and assistance!