3 Replies Latest reply on Mar 2, 2011 12:01 PM by Jerry62712

    How does this code print work

    Jerry62712 Level 1

      There is an example here (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/printing/FlexPrintJo b.html) of printing from Flex that will do multiple pages and add a header and footer.  But I don't understand all of it.

       

      1) what does ...nextPage() followed by ...showPage("last") do?  It would seem that it advances a page (say from 1 to 2) and then jump to the last page (say 35).

       

      2) do the formprintview, header and footer components need to be in any particular place?

       

      3) are these things visible on the screen somewhere?

       

      4) only 27 lines of data appear on a page, can this be increased by eliminating grid lines?

       

      5) the footer only appears on the last page, can it be on each page?

       

      6) the header only appears on the first page, and it is below the page number, why isn't it over it?

        • 2. Re: How does this code print work
          pauland Level 4

          Jerry, you would learn more by taking the examples that you refer to and trying them on your own system. You can then play with them and really get to know how things work. They are self-contained and not just intended for people to read.

           

          Then, at least you will know the answer to "3) are these things visible on the screen somewhere?", if nothing else.

           

          Have a try and see how you get on.

          • 3. Re: How does this code print work
            Jerry62712 Level 1

            Hi Paul,

             

            I've been afraid to try the examples on my system.  We are using ClearCase and I didn't want to run any chance of screwing up something there.  We are paying our consultans several million dollars and I don't want them to come back at me as an excuse for why they are so late.  Being only a relative newbie to Flex, I'm not comfortable with everything.

             

            That being said, I did create a new project (haven't have the cajones to save it yet) where I hope to put things to experiment on them.  I think you have a good idea on trying out the things.

             

            I do have a syntax question, however.  In this statement:

            OptionContent(event.relatedObject).submitSearch();

             

            I see that a class "OptionContent" is being accessed to execute the method "submitSearch()".  I don't know what the heck the event part is about.  We use this construct frequently in this project so it's important that I know it.  I know it must be fairly well known due to the frequency, but I can't even imagine what to do a search on to find it out.