nik.be Posted August 30, 2007 Posted August 30, 2007 (edited) 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, 2007 by Guest
Vaughan Posted August 30, 2007 Posted August 30, 2007 "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.
LaRetta Posted August 30, 2007 Posted August 30, 2007 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
comment Posted August 31, 2007 Posted August 31, 2007 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.
LaRetta Posted August 31, 2007 Posted August 31, 2007 (edited) 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, 2007 by Guest Added stuff
LaRetta Posted August 31, 2007 Posted August 31, 2007 You can put ANYTHING - hide ANYTHING within a part!
nik.be Posted August 31, 2007 Author Posted August 31, 2007 [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
LaRetta Posted August 31, 2007 Posted August 31, 2007 (edited) 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, 2007 by Guest Added Update
nik.be Posted August 31, 2007 Author Posted August 31, 2007 Hi LaRetta, Thanks for the update. Everything works "brilliantly" (like the Horsehead nebula). Nik
LaRetta Posted August 31, 2007 Posted August 31, 2007 (edited) 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, 2007 by Guest
LaRetta Posted September 1, 2007 Posted September 1, 2007 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.'
comment Posted September 1, 2007 Posted September 1, 2007 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.
Recommended Posts
This topic is 6293 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now