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

print only current record

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

    print only current record

    I posted in the summer but then had to put things aside and never got to the problem or got it fixed. Please help if possible.
    1 I have a letter that I send out to new clients which fills the fields of date, fullname, address, etc. - it used to work fine when I simply pressed a button.
    2 My table and/or set became corrupted early in the year and has not worked properly since.
    3 Now when I press the button to print the letter - it begins at the first record and continues to print thousands of records
    4 When I go to design the button and try to filter it, there is nothing for "8 current record only" as there is under other letters, forms, and labels

    So my question is - what do I need to put - and where do I need to place it - so that ONLY the record with that person's fullname prints that single letter?
    Attached Files

    #2
    Re: print only current record

    Hi Art,

    The Onchange event from button should be work. but not sure about your filter.
    Can you show your filter?

    Comment


      #3
      Re: print only current record

      current record only - only appears if the form and report are based on the same table/set.

      Otherwise use a filter on a unique value for the report. If you know the record number of the parent table of the report that'll work.
      Al Buchholz
      Bookwood Systems, LTD
      Weekly QReportBuilder Webinars Thursday 1 pm CST

      Occam's Razor - KISS
      Normalize till it hurts - De-normalize till it works.
      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
      When we triage a problem it is much easier to read sample systems than to read a mind.
      "Make it as simple as possible, but not simpler."
      Albert Einstein

      http://www.iadn.com/images/media/iadn_member.png

      Comment


        #4
        Re: print only current record

        I have not set a filter that I know of as I don't know what it should be. Have it set so the "onpush" event prints the letter. I am not that sophisticated. I know it would work if I set it so that it would only print the letter for that "fullname" or for that record number but don't know how to write that filter. Any help would be appreciated.

        Comment


          #5
          Re: print only current record

          Thanks Al but I don't think I am using a report. The letter is based upon the form I am using which has focus to the "fullname" and/or record #. I just don't know how to say - when sending this to the printer - just use the info from the record that equals "fullname" or "record number" - and then where to place that info. I would assume as a filter but just do not have enough experience to write something like that.

          Comment


            #6
            Re: print only current record

            A letter is a variation of a report with a couple of additional options.

            Put the control panel in detail view and look at the form and letter to see that they are based on the same table/set.

            If not can they be? That's the easy way out.

            Otherwise post a sample and we'll fix it for you.
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              Re: print only current record

              Thanks again - the form is from "client.set" and the letter is from "master.dbf" which is a child of the client set. All fields on the letter are from master.dbf.

              Comment


                #8
                Re: print only current record

                Originally posted by lake trash View Post
                Thanks again - the form is from "client.set" and the letter is from "master.dbf" which is a child of the client set. All fields on the letter are from master.dbf.
                Otherwise post a sample and we'll fix it for you.
                Al Buchholz
                Bookwood Systems, LTD
                Weekly QReportBuilder Webinars Thursday 1 pm CST

                Occam's Razor - KISS
                Normalize till it hurts - De-normalize till it works.
                Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                When we triage a problem it is much easier to read sample systems than to read a mind.
                "Make it as simple as possible, but not simpler."
                Albert Einstein

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #9
                  Re: print only current record

                  Your screenshot shows you are using the older multi-state A-Z buttons where a filter or query is used to display the clients whose name matches the selected letter. What I don't see is a button that the user would click to print the letter(s). I also don't see a field that would indicate the status of the client as 'new' vs 'active'. So my guess is you are wanting to print one letter at a time for the current client displayed? If that is the case a field that contains a unique record ID (not the record number) for the client (master.dbf) would be helpful. Then your print button could grab that field value and use it in the filter that you use to print the letter.

                  Just one example for your button script if you display the client_id on the form:

                  dim get_rec as c = ""
                  dim vfilter as c = ""
                  dim vorder as c = ""
                  get_rec = client_id.value
                  vfilter = "client_id =" +quote(var->get_rec)
                  preview_letter("yourlettername",vfilter,vorder)
                  Last edited by MoGrace; 12-16-2018, 12:05 PM.
                  Robin

                  Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                  Comment


                    #10
                    Re: print only current record

                    Hi Art
                    Your forum profile settings are not allowing email responses.

                    a unique field for the table is namenumber
                    the letter name is new intro

                    So using your info, the button script to print a letter for the current record would now be this:

                    dim get_rec as c = ""
                    dim vfilter as c = ""
                    dim vorder as c = ""

                    get_rec = namenumber.value
                    vfilter = "namenumber = " +quote(var->get_rec)
                    preview_letter("new_intro",vfilter,vorder)

                    Note that to set the variable get_rec this way using indirect form methods, your field namenumber must be displayed on the form. Otherwise you would need to get a pointer to the current record in the child table which is more trouble than you need right now. Also, it wouldn't hurt to have an index for this field in the child table if you don't already.

                    BTW, posting here is always free!
                    Robin

                    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                    Comment


                      #11
                      Re: print only current record

                      For what it's worth, I find that printing from a set can be problematic. What I do is to create a table that I base the report on that has only the one record to be printed. I then zap that table then copy the appropriate record to that table. Then I print the report. There is only one record and no set to deal with. For repeat letters, I just repeat the process for each letter. Perhaps this is not the most efficient way to go, but it works.

                      Comment


                        #12
                        Re: print only current record

                        Originally posted by Gene FitzPatrick View Post
                        For what it's worth, I find that printing from a set can be problematic. What I do is to create a table that I base the report on that has only the one record to be printed. I then zap that table then copy the appropriate record to that table. Then I print the report. There is only one record and no set to deal with. For repeat letters, I just repeat the process for each letter. Perhaps this is not the most efficient way to go, but it works.
                        I'm not sure what the problem is that you are having with reports and sets, but I use sets with reports almost exclusively rather than basing the report on a single table.

                        I often find I need more fields from another table and having a report set makes it very easy to add another table and get the data I need.

                        That works well in dbf land.

                        In SQL land, I'd use a view to get the data I want for a report. (which the SQL view and the DBF set are similar in nature)
                        Al Buchholz
                        Bookwood Systems, LTD
                        Weekly QReportBuilder Webinars Thursday 1 pm CST

                        Occam's Razor - KISS
                        Normalize till it hurts - De-normalize till it works.
                        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                        When we triage a problem it is much easier to read sample systems than to read a mind.
                        "Make it as simple as possible, but not simpler."
                        Albert Einstein

                        http://www.iadn.com/images/media/iadn_member.png

                        Comment


                          #13
                          Re: print only current record

                          I hear you Al. This may be an approach I started when there was a need to do mass emailing, which I still do without using anything outside Alpha. There are many ways to get the job done.

                          As they say, everything is for someone but nothing is for everyone!

                          Comment

                          Working...
                          X