3 Replies Latest reply on Sep 28, 2011 9:18 AM by philmodjunk

    Hide from printing

    ScottSesen

      Title

      Hide from printing

      Post

       Good morning,

      Does anyone know if there is a way to hide a field from printing ONLY if it is empty?  Here is what I am trying to do...

       

      I want to create an invoice to print.  The data will come from values in fields entered by our associates.  I have created, for example:

       

      For say Widgets there is QTY, Description, Unit Price and total price.  There are the same types of fields for product X and Y and Z etc.  The associate will go in and put in say QTY 5, Group4 Widgets, Unit price of 1.25.  They then might do the same for product Y.  How do I create an invoice that ONLY shows the lines for Widgets and Product Y but does not show the lines for all the other products that have no values in them?

       

      I hope my explanation is concise enough for you to get the idea but I can try to elaborate if needed.

       

      I have attached an image of the input fields

       

      One other note.  The description and unit price can and will change almost every time so I can't just put in a "product" in the FM built in invoice template.

       

      Thanks for all your help.

      Image.jpg

        • 1. Re: Hide from printing
          philmodjunk

          Does this screen shot show one record or 12 records? I believe you have one record here and that's the trouble.

          Invoicing systems are generally built around 3 tables related in the following set up:

          Invoices---<LineItems>----Products

          Invoices::InvoiceID = LineItems::InvoiceID
          Products::ProductID = LineItems::productID

          With this set up, you use a portal to LineItems on your invoices layout to specify the items sold on a given invoice. Pricing and description data is pulled from Products when a ProductID is selected in a drop down or pop up formatted ProductID field in the portal row. The invoice may then be printed from a layout based on the lineItems table.

          Since you only have records listed in LineItems for items actually sold on that invoice, you don't have any empty fields to omit from your printed invoice.

          The invoices starter solution is set up with this structure and prints invoices in this fashion. This much simpler demo file created by Comment is also set up in this fashion so you can down load it and take it apart to see how it works:  http://fmforums.com/forum/showpost.php?post/309136/

          • 2. Re: Hide from printing
            ScottSesen

             Thanks.  You are correct that it is one record.  We don't really have "Products" that we sell like a warehouse but services with so many different variables that we use the Description field to show the details.  We also have Misc. fields for services we provide that we can't really quantify.  I was hoping I could just set up all the fields on a layout that looks like our invoice and create a script to not print blank fields and shift them up.  Seems simple enough but it doesnt look like you can hide from printing conditionally unless you happen to know of a way.

            • 3. Re: Hide from printing
              philmodjunk

              You should stil use at least the Invoices to LineItems part of the system I recommended. The Products table may still be of use to you if you use it to list typical services offered by your business, but this is an option, not a requirement in order for this to work. The key detail is that a portal to line items eliminates the problem you are having with the empty fields.