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

help with special printing needs

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

    help with special printing needs

    I an trying to have a5 print out a certain number of copies of a report if a certain condition is met by any one of the line items in an invoice.

    EX: I have a button on a form that will print the picking ticket for an order. The line_item table has a field that is logical as to whether or not we have to custom fabricate the item. If that field evaluates to true for any of the items in the order, I want the button to print (2) copies of the report.

    My current script for this button is:

    dim A_FORM_CURRENT as c

    if db_mode_get(db_current()) > 0 then
    menu_run("Records/Save")
    else
    end if

    print_report("PICKING TICKET")

    #2
    RE: help with special printing needs

    Mikki,

    Does the script work? I presume it doesn't else you wouldn't have made this post.

    There's a lot more about Xbasic I don't understand than I do understand. I intrepret your script to mean that the field you're basing this on is a numerical field and if it contains a value greater than 0 you want the report to print. If so, can you not say something like:

    if(yourfield is >0, the print the report,"")

    I'm really showing my ignorance here but I don't understand why you need to reference the form?

    I would think simply making reference to the field, rather than the form, should be enough to trip printing the report.

    Perhaps this will draw others much more knowlegable than I into this thread? Just trying to help.

    kenn
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

    Comment


      #3
      RE: help with special printing needs

      Mikki,

      I think you are on the right track, but You somehow need to issue the print a second time on condition.

      Try this. It is brute force, but it should work

      dim A_FORM_CURRENT as c

      if db_mode_get(db_current()) > 0 then
      menu_run("Records/Save")
      else
      end if

      print_report("PICKING TICKET")

      **** Conditionally print the 2nd ticket ******
      if > = .T.
      print_report("PICKING TICKET")
      end if
      end

      This should print the 2nd time only if your logical > is true.

      Hope it helps,

      Tom

      Comment


        #4
        RE: help with special printing needs

        What's this menu_run() thing you have there? Is this the beta or v4.5? Interesting to say the least.

        Tom Lyon

        Comment


          #5
          RE: help with special printing needs

          Perhaps we will be able to control the printer setting for number of copies in Version 5. In the meanwhile I worked out an inelegant fiddle.

          Keep a temp table with the same structure as your data table to print from. To print, you
          -calculate the number of copies you need
          -empty the temp table
          -copy the record to be printed as many times as you need copies
          -print the whole temp table.

          In report design you must set each record to begin on a new page.

          Ain't pretty but it works.

          Bill
          Bill Hanigsberg

          Comment


            #6
            RE: help with special printing needs

            I just noticed that what I put between the "" is missing!!! That should be your conditional expression. something like "fieldvalue = .T.", where fieldvalue is thename of the logical field in your table.


            Sorry,

            Tom

            Comment


              #7
              RE: help with special printing needs

              menu_run is an "OLD" version 1 command.

              Comment


                #8
                RE: help with special printing needs

                Tom,

                Did you mean?

                if ""condition>> = .T.
                There can be only one.

                Comment


                  #9
                  RE: help with special printing needs

                  yes,I type faster than I thnik!

                  Comment


                    #10
                    RE: help with special printing needs

                    If condition = .T.
                    For i = 1 to X
                    print_report("PICKING TICKET")
                    next
                    End if


                    ...where "condition" is your expression and "X" is a variable for the number of reports that you wish to print.
                    Peter
                    AlphaBase Solutions, LLC

                    [email protected]
                    https://www.alphabasesolutions.com


                    Comment


                      #11
                      RE: help with special printing needs

                      Hi Peter,

                      This little exchange shows how nice it will (would?) be if V5 allows us to control the printer with Xbasic. My method is a kludge and yours, more elegant, requires that the report be generated for each copy which could take a while if it is a large report (which in this case I gather it isn't).

                      Bill
                      Bill Hanigsberg

                      Comment


                        #12
                        RE: help with special printing needs

                        Hi Bill,
                        I do believe that v.5 allows you to control this - but don't quote me.
                        Peter
                        Peter
                        AlphaBase Solutions, LLC

                        [email protected]
                        https://www.alphabasesolutions.com


                        Comment

                        Working...
                        X