4 Replies Latest reply on Apr 7, 2011 1:49 PM by webstyr

    Printing 2nd, 3rd, etc.. of a form with portal on it

    webstyr

      Title

      Printing 2nd, 3rd, etc.. of a form with portal on it

      Post

      OK, here is what I have. I have an 8'5" x 11" form which has mostly dumb static text on it except for the upper left corner where there is a portal. The portal displays 10 rows on the form. There are times when there are more than ten rows in the portal. I need to be able to print additional pages of this form that has the remaining rows of the portal not printed on the first page.

      Here is what the form looks like when it is printed:

      In Edit Mode the upper left corner containing the portal looks like this:

      The portal is defined as having 10 rows displayed so it matches the static text to the right on the form.

      The script which prints the form looks like this:

      This script prints the first page just fine, but won't automatically print a second page with the remaining rows of the portal.

      Any suggestions as to how I go about this? Thanks!

        • 1. Re: Printing 2nd, 3rd, etc.. of a form with portal on it
          philmodjunk

          If you have 11 or more rows in the portal, what static text is needed for each of those rows?

          If you can get all the data shown above the Work Codes section into a portal, there's a way to print this that does not require a portal for the data above this point.

          What layout objects do you have below the Work Codes header? Layout text? A second portal? individual fields from the same record or ?

          A quick and dirty solution that may work for you at least in the short term:

          1. Create a second layout that is a duplicate of this layout.
          2. Edit portal setup... so that it displays 10 rows with row 11 as the initial row.
          3. Edit the layout as needed to make it work for rows 11-20.
          4. In your script, after printing page one, You can use the count function to count the number of records in the portal's table. If it exceeds 10, the script can change layout and print the second page from this new layout.
          • 2. Re: Printing 2nd, 3rd, etc.. of a form with portal on it
            webstyr

            Everything on the page is static text except for the portal in the upper left corner (2nd picture) and that goes for the text below the Work Codes header. They need this ASAP which is why I didn't put anything else in the portal. I may look at this option down the road when I have more time for sure. In fact, the plan is to get the whole thing into the system so it can be filled out on-site using an iPad. Next phase of the project.

            For now I like your quick and dirty solution Phil. I will explore it further. It doesn't look like it will take that long to do. Thanks for your help!

            • 3. Re: Printing 2nd, 3rd, etc.. of a form with portal on it
              philmodjunk

              When you get the time, take a careful look at how the invoices starter solution prints out an invoice. That invoice contains a portal of related line items records and the layout used to print the invoice automatically adjusts for item lists that exceed the number of rows shown in the original portal by using a list view layout based on the portal table. That's the suggestion I was alluding to at the start of my last post.

              It would require loading the "static text" to the right of this portal into fields in your portal table so that the portal spans the entire top of the layout. Once you can do that, the list based layout like the starter solutions uses becomes a possible solution.

              • 4. Re: Printing 2nd, 3rd, etc.. of a form with portal on it
                webstyr

                That sounds like exactly what I'll do when I get the time. That will handle things until they go to an all iPad solution on-site. Thanks Phil.