August 30, 200718 yr Hi, Does anyone know a way of changing the Sliding/Printing settings, via a script? I have a form view layout with a logo at the top which in some cases needs to be printed in a PDF and in other cases it does not. I don't really want to create another layout, but simply have 2 buttons at the top of the layout: BUTTON 1 for printing with the logo and BUTTON 2 for printing without the logo. Any ideas? Thanks in advance. Nik Edited August 30, 200718 yr by Guest
August 30, 200718 yr "I don't really want to create another layout" That's the way I'd do it, have two layouts and script the navigation between them.
August 30, 200718 yr If you place your logo in a container, you can use a calculation (container) to conditionally display the logo, depending upon whether you have a global flag on (a simple 1 in a field). I agree, Nik - I wouldn't duplicate a layout unless I have no choice because keeping them in sych is a PIB. I can easily see the request to display or not a Logo; particularly if it is large and colorful. When printing an internal copy of an invoice; leave it off; else put it on. LaRetta
August 31, 200718 yr You could put the logo in a dummy sub-summary part. For a form view, a leading sub-summary by SerialID could work well - if you include SerialID in the sort order, it will print with the logo; if not, the part won't show and the rest of the layout will slide up.
August 31, 200718 yr So a simple sort will determine whether it displays or not! It works! I'm trying to think of a situation where the sort might be different; and it might be. But I can't think of any time it can't be worked around. Cool! And conditionally displaying a part - based upon whether the part's sort item is sorted ... great stuff! And by using the unique ID, it'd NEVER butt up against other sort orders! Edited August 31, 200718 yr by Guest Added stuff
August 31, 200718 yr Author [color:gray]"If you place your logo in a container, you can use a calculation (container) to conditionally display the logo, depending upon whether you have a global flag on (a simple 1 in a field)." Thanks all for the reply. I like the idea that LaRetta came up with (see above). I have the company logo in the header and the company details in the footer. How exactly should I use conditionally the container to have them printing or not? I have created a check box with a global value. What next? Thanks again. Nik
August 31, 200718 yr Hi Nik, Here's the concept (attached). Notice I'm using global field for the flag. In this way, each person who chooses to print can determine whether to print the logo, no matter what other Users decide. Placing the logo in a Preferences (or system or globals) table is pretty standard behavior. However, many people make the mistake of relating the tables. By using a global calculation, this logo can be available throughout your solution without connecting the tables. The logo I chose is one of my favorite pictures (the Horsehead nebula). UPDATE: Also, that flag can be ON the layout with the logo - just control that it doesn't show while printing by setting the Format > Sliding/Printing to 'Do not Print' while the label and field are selected. LaRetta LogoShow.zip Edited August 31, 200718 yr by Guest Added Update
August 31, 200718 yr Author Hi LaRetta, Thanks for the update. Everything works "brilliantly" (like the Horsehead nebula). Nik
August 31, 200718 yr I hope you realize that you can have the print buttons handle setting that global so it doesn't have to be on the form at all. Set it to 1 for display and "" to empty the field again. Also, the global doesn't have to be in the Data table. Ideally, it should be in Preferences, system or global table. I confess that I cheated when putting this together and grabbed another test file and I simply modified it a bit. UPDATE! But the logo was new! Edited August 31, 200718 yr by Guest
September 1, 200718 yr Hi Nik, I have been playing with Michael's idea of placing the logo in a leading summary (because the concept is very cool). I realized that you requested the ability for sliding/printing. My method works in browse mode but will NOT reduce (the space for the logo) in preview mode if no logo is selected. Michael's method will not work in browse mode but the part will reduce (actually disappear) in preview mode. If you wish for the logo space to decrease (if no logo exists) then you will need to use Michael's method because it perfectly matches your request. Set the Format > Sliding/Printing to slide up and also check 'reduce size of enclosing part.'
September 1, 200718 yr Set the Format > Sliding/Printing to slide up and also check 'reduce size of enclosing part.' This is not required - if the field is not included in the sort order, Filemaker will just skip the sub-summary part when rendering the layout in preview/print.
Create an account or sign in to comment