4 Replies Latest reply on Nov 9, 2016 2:24 PM by Vaughan

    Printer or Layout settings - can they be changed via scripts?

    user28222

      Hi FM community,

       

      Does anyone know if there are options to change printer & even the layout settings within FM script?  

       

      I will read up on FM's Script Guide, but wanted to get the experts' advise on how to best do the two following things(or even if it's possible!):

       

      a) Can we specify that a report will be printed out on a 11 x 17 paper sheet and change portrait/landscape mode within the script?

      b) Can we dynamically adjust the width of the field columns in the layout, which would get narrower or wider depending on the the number columns being printed?  The goal is to fit everything into one page automatically while maintaining a decent design.

       

      Thanks in advance,

      Wonmoh

        • 1. Re: Printer or Layout settings - can they be changed via scripts?
          philmodjunk

          A) to a limited degree, yes. You can use different copies of the print setup script step to specify different paper sizes and/or orientation.

           

          Plug ins are available that offer more specific control if you need it.

           

          B) unfortunately, this is not possible

          • 2. Re: Printer or Layout settings - can they be changed via scripts?
            Mike_Mitchell

            You might be able to approximate (b) using the Sliding feature:

             

            2016-11-09_13-44-05.png

             

            However, this is dependent on exactly what you're doing. It can only get narrower, not wider (so you would want to make the columns as wide as they possibly might need to be and then allow them to adjust if they're empty). And you're probably doing to have to do a lot of playing with it to get it to work reliably.

            • 3. Re: Printer or Layout settings - can they be changed via scripts?
              dtcgnet

              b) Can we dynamically adjust the width of the field columns in the layout, which would get narrower or wider depending on the the number columns being printed? The goal is to fit everything into one page automatically while maintaining a decent design.

               

               

              I agree with the other responses related to DYNAMICALLY adjusting the width of the columns. I don't really see a decent way of making that happen predictably.

               

              However, depending on how much variability you have with regard to the number of columns being printed, you could use Hide options. Don't try to go crazy with it, but...let's say you were printing either 5 columns or 10 (for example). You could set up your layout with 5 columns of one width, and the same layout with 10 columns of another width. When your user opts for report 1 (which has the 5 columns), you'd hide the other 10 columns (by setting some global variable to $$Columns = 5, for example). If your user opted for report 2, you'd set $$Columns to 10, and use that value to hide the 5 column setup.

               

              Something like:

              FieldA (part of a 5-column printout) (Hide when $$Columns = 10)

              FieldB (part of a 5-column printout) (Hide when $$Columns = 10)

              etc.

               

              FieldA (same as above, but part of a 10-column printout) (Hide when $$Columns = 5)

              FieldB (same as above, but part of a 10-column printout) (Hide when $$Columns = 5)

              etc.

               

              You COULD do this. It could rapidly become a pain in the behind, or it could work wonderfully. Think it all through carefully ahead of time.

              • 4. Re: Printer or Layout settings - can they be changed via scripts?
                Vaughan

                You can create multiple layouts to accommodate more and less amounts of data. Start at the smallest-data layout, preview the page, go to the last page: if the last page is greater than 1 the change to the next data layout and repeat until all the data fits on one page (or you run out of layouts).