Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Printing Multiple Reports

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printing Multiple Reports

    How can multiple reports be printed at the same time?
    For example - if we have a series of invoices, how can a selected group be printed at once? Can these be selected/filtered via a multi-select list box?
    The work-around which I have for now is as follows:

    Create a temporary table with 1 column (sales_id)
    Insert sales_id of each report required for printing into this table
    Query (mySQL) on which report is based links to this temporary table which means ony sales_id in this table are printed.

    Each report is fairly complicated - lots of calculations, sub-queries, etc which means that to preview/print individually from a grid would take quite some time.
    The above solution is ideal except for one thing...
    Each report can be 1 or more pages each - quite often just 3 or 4. The footer of the report displays a page x of y. Now when printing a group of reports, it displays the total number of pages. ie if 5 reports of 3 pages each were printed, it would say in the footer Page x of 15.
    Using this example, it there a way to display page x of 3 for each report even though the 'full' report is made up of 15 pages?

  • #2
    Re: Printing Multiple Reports

    When you ask about printing multiple reports, are you actually printing two or more reports (creating 2 or more PDF files) or are you printing multiple RECORDS to the same report - so you end up with 1 PDF file, but 4 different records and data grouped together of 1-5 pages each?

    Comment


    • #3
      Re: Printing Multiple Reports

      Yes - multiple records to the same report.
      I need the result to be one pdf file where pages are numbered according to the 'groups' rather than the total pages in the complete pdf.

      Comment


      • #4
        Re: Printing Multiple Reports

        Why not print separate reports as pdf files, then use a routine to combine the pdf files into one big pdf file? The one big pdf can then be printed, displayed or emailed.

        I find it difficult to get the page renumbering to work the way I wanted for groups, so this is a quick and fast way to accomplish that.

        Mike
        Last edited by Mike Reed; 03-09-2017, 07:23 PM.
        Mike Reed
        Phoenix, AZ

        Comment


        • #5
          Re: Printing Multiple Reports

          I have routine a that creates separate files for each new invoice for a customer. Then I run a pdf combine function that takes all the separate invoices and combines them into one pdf. It uses the built in Alpha command 'pdf_append()' to do the combining.

          The process saves each invoice file in the 'private path' for the user. Each invoice file has the invoice number as a part of the file name, e.g. INV_12345.pdf. Then I use this function to combine the pdf files. The function sorts the file names alphabetically and combines them into one pdf file.

          Be sure to delete the combined pdf from the private path after it has been printed or emailed or you will have a huge mess.

          Mike

          FUNCTION prt_combine AS C (vcom_id as c )
          'this routine is used to combine invoices for a given property into one pdf file. Used where a customer wants one pdf for all invoices, in invoice number order.
          'vcom_id is the property ID number.
          'get a list of file names to be combined.
          file_list = filefind.get(A5.GET_PRIVATE_PATH()+chr(92) + "Invoice" + chr(92)+ "*.pdf",0,"PN")
          'sort the file names alphabetically
          sortsubstr(FILE_LIST,CRLF())
          'get a count of how many files to combine
          count = w_count(file_list,crlf())
          'here is where the work is done.
          IF count > 1
          'assign the filenames to an array
          DIM names[count] as C
          names.initialize(file_list)

          WHILE names.size() > 1
          'append one file to the next, then delete the appended file
          pdf_append(names[1],names[2])
          IF file.exists(names[2]) THEN
          file.remove(names[2])
          END IF
          'delete the appended file from the list
          names.delete(2,1)
          'resize the file list
          count = count - 1
          names.resize(count)
          END WHILE
          'get the filename for the remainig file
          file_list = filefind.get(A5.GET_PRIVATE_PATH()+chr(92) + "Invoice" + chr(92)+ "*.pdf",0,"PN")
          END IF
          xbasic_wait_for_idle(1)

          DIM vfilenew AS C
          DIM vpath AS C
          'get the path name from the file_list variable
          vpath = file.filename_parse(file_list,"dp")
          'create a new variable name that holds the full path of the combined report with a the new name.
          vfilenew = vpath + vcom_id + "_Invoices.pdf"
          'rename the file using the property ID number.
          file.rename(file_list,vfilenew)
          prt_combine = vfilenew
          END FUNCTION
          Mike Reed
          Phoenix, AZ

          Comment


          • #6
            Re: Printing Multiple Reports

            The problem with printing each report separately is simply the time that it takes. Even if it takes 30 seconds to load up a single report/invoice (and sometimes longer), when there could be 15-20 of these at a time, you see that a lot of time is spent simply waiting on reports to load.
            Each report (invoice) is for a different customer which is why a single combined file is not a solution. Each report/invoice needs to be a separate report and ideally with its own page numbering.

            The current workaround which I have described above is perhaps the best solution in the meantime. It means simply typing the invoice numbers and then click print. For a print run of 15 invoices, its just a matter of entering the relevant invoice ids - the whole process is now only 2 mins max compared to up to 1 min per single report as previously was the case.

            The only drawback is page numbering. This is not a big problem and unless the customer comes back with a specific request for page numbers, the current solution will probably continue for now. I have put a continuation footer with 'Continued...' which seems to be satisfactory for now.

            Comment


            • #7
              Re: Printing Multiple Reports

              Each report can be 1 or more pages each - quite often just 3 or 4. The footer of the report displays a page x of y. Now when printing a group of reports, it displays the total number of pages. ie if 5 reports of 3 pages each were printed, it would say in the footer Page x of 15.
              The only drawback is page numbering.
              would you please explain more on this.

              i understand so far, how you are printing the desired reports by creating a temp table to feed the invoice numbers (or the relevant numbers ).
              i also understand you have page numbers in the footer.
              do you have group turned on, so that each new group will start on a new page. and have you used the pageno(grp->invoice_number). but still it is not printing as it should, per invoice?

              i see you are in mobile/browser section. is that not possible to create an ux/dialog with a textbox or area to enter all the invoice numbers and call the report via sql command using the numbers provided
              or
              create a editable grid where you do not add any new record just able to delete.
              in the toolbar action button create a button to print the reports.
              then create an ux/dialog to enter the record into the grid.
              then call this grid from the dialog and print reports.
              or
              just you may have a better solution than mine.
              so it looks all done in sequence.
              thanks for reading

              gandhi

              version 11 3381 - 4096
              mysql backend
              http://www.alphawebprogramming.blogspot.com
              ggandhi344@gmail.com
              Skype:ggandhi344@gmail.com
              1 914 924 5171

              Comment

              Working...
              X