8 Replies Latest reply on Apr 28, 2014 4:01 AM by erolst

    How to Print the Tab Control all data

    Ragupathi

      111.JPG

       

      Hi every one

       

      I need to print the Tab Control data like

      First tab

      Second Tab

      Third tab

      .

      .

      .

      .

      Till End

      But its Printing only the Current record and Current Tab

       

      I Just Created the Script

      2222222222.JPG

      but Still its Print only the Current record of Current Tab

       

      a

        • 1. Re: How to Print the Tab Control all data
          erolst

          1. Why don't you use the Script debugger to see what is actually happening?

           

          2. The tab name is NOT the object name; check that those tabs actually have an object name assigned in the Inspector that you can use in Go to Object.

           

          3. You can vastly simplify this script by using

           

          Set Variable ( $tabObjectNames ; List ( "Report Result" ; "Page 1" ; "Page 2" { …etc.} ; "CAR" )

          Loop

            Exit Loop if [ Let ( $i = $i + 1 ; $i > ValueCount ( $tabObjectNames ) ) ]

            Go to Object [ GetValue ( $tabObjectNames ; $i ) ]

            Print [ … ]

          End Loop

          Ragupathi wrote:

          Still its Print only the Current record of Current Tab

          4. Your script doesn't say anything about another record; you'd need to wrap the print loop into an outer loop to process other records.

          • 2. Re: How to Print the Tab Control all data
            coherentkris

            I would caution you against using hyphen in object names. In fact i would not use any mathematical or find operator character in an object name. It could confuse the calc engine

            • 3. Re: How to Print the Tab Control all data
              DavidZakary

              I would create a dedicated layout for printing with all of the tab panel information removed from the panel and stacked vertically. This way you don't have to repeat the info at the top of the layout every time, can control page breaks a bit and create a layout that is better formatted for printing. You'd also be able to do it with one print command rather than one for each tab panel.

              • 4. Re: How to Print the Tab Control all data
                erolst

                coherentkris wrote:

                I would caution you against using hyphen in object names. In fact i would not use any mathematical or find operator character in an object name. It could confuse the calc engine

                Hardly – the argument you pass to Go to Object is a string expression, so unless you try to Evaluate() it, it's just a piece of (meta)data.

                 

                btw, if you think you need to caution someone, caution the OP, not me.

                • 5. Re: How to Print the Tab Control all data
                  coherentkris

                  Man it's gettin uptight in here....

                  • 6. Re: How to Print the Tab Control all data
                    Ragupathi

                    I am facing error how to resolve this can you guide me

                    1.1.JPG

                    • 7. Re: How to Print the Tab Control all data
                      DavidZakary

                      Your LET statement isn't properly structured. You want it to be in this format...

                       

                      Let ( [

                       

                      var1 = expression1 ;

                      var2 = expression2

                       

                      ] ;

                       

                      calculation

                       

                      )

                      • 8. Re: How to Print the Tab Control all data
                        erolst


                        Ragupathi wrote:

                         

                        I am facing error how to resolve this can you guide me

                         

                        1. What David said (though if you only declare one variable, as shown in the sample code, you don't need the brackets …)

                         

                        2. Until you understand a given piece of code, it's better to simply copy it instead of trying to modify it. I don't see anything about '$i = 0; $i + 1' etc. in the sample code …

                         

                        and even using square brackets, as in …

                         

                        Let ( [

                        $i = 0 ;

                        $i + 1

                        ] ;

                        )

                         

                        would give you an error, because $i + 1 doesn't constitute a variable assignment.