8 Replies Latest reply on Apr 15, 2013 6:45 AM by mikebeargie

    printing receipt

    fmk4

      Hi,

       

      I have a table containing sales ticket, their associate purchased items.

       

      Each purchased item is tied to one sale ticket

      There can be many purchased item in one sale ticket

       

      How can I print the receipt for the sale ticket, since each of the sale ticket has no fixed amount of purchased item.

       

      The sale ticket needs to list all the item purchased.

       

      I have tried using portal to display the purchased item that is related to the sale ticket. This works, but I have to prefixed a number of row for the portal. Some sale ticket with 1 or 2 item ends up wtih a large empty portion in my receipt.

       

      How should I do this receipt printing?

        • 1. Re: printing receipt
          DavidZakary

          Don't try to print via a portal if possible. Isolate all of the related records and use a layout based on the table for the related records.

          • 2. Re: printing receipt
            taylorsharpe

            I am trying to get a picture of what you are doing.  Is there a table for Sales Tickets, containing a Sales Ticket Primary Key, and then a second table for Items.  Each Item will have a Foreign Key which is the Sales Ticket's Primary Key and each Item will have a description and price.  If that is the case, then create a layout using the Items table and you would search for Items with a Foreign Key of the particular Ticket you want to print.  The Ticket info would go in the header/footer and the Items info would be in the body.  Attached is an example, but a lot more can be done. Tell us more and we can help.  

            • 3. Re: printing receipt
              fmk4

              Hi Taylor,

               

              The issue here is that the body is fixed. Its a waste of paper if I were to print out this layout on a receipt printer (with a large portion of the body empty). I wish its something more dynamci, adjusting according to the items

              • 4. Re: printing receipt
                PSI

                FMK4,

                 

                Just to confirm. you are printing from the sale items table. the layout is a list view. set all the objects in the body to slide up and check also resize enclosing part.

                Sliding.JPG

                John Morina

                PSI, Inc.

                CCQ-FM, Inc

                • 5. Re: printing receipt
                  fmk4

                  Hi,

                   

                  Yes I tried using your suggestion, with the sliding option and stuffs, but still, in list view, the footer drops to the bottom of the windows, leaving a big gap of emptiness in the middle.

                  • 6. Re: printing receipt
                    mikebeargie

                    In your case (receipt printer) I would suggest NOT using a footer.

                     

                    Try using a "trailing grand summary" instead. This will appear directly after the last record in a list view, as opposed to the page bottom as a footer will.

                    • 7. Re: printing receipt
                      fmk4

                      Hi,

                       

                      I was able to get the trialing grand summary to output the sum of the total field.

                       

                      I did a "page break after 4 occurence" and the summary field only appear at the end of the page 4.

                       

                      Is there a way to make summary field appear for every page, and each page should only display the total sum applicable for that page, example, page 1, total $4, page 2 total $6, page 3 total $10, grand total $20.

                      • 8. Re: printing receipt
                        mikebeargie

                        Hmm, you can probably use a subsummary after the body section instead of a trailing grand summary, you just have to sort a specific way for the subsummary to appear. I suggested a trailing grand summary because I thought you'd only be printing out one page at a time.

                         

                        Alternatively you could use what you currently have now, and just drop the print inside a loop so it prints 4 times.