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 Current Record Problem with Child Record

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

    Print Current Record Problem with Child Record

    I am trying to print a form for a set showing data from both the parent and child record. I only want one form to print for the child record selected from an embedded browse (or shown on the tabbed subform) but Print Current Record is not working. It is printing a form for EVERY child record. I was able to do this in Alpha4 by using the Quick Print Form option. I thought this was working OK in Alpha5 by creating a Print Button and selecting the correct events (Print Layout - (named form) - Print Current Record), but now I cannot get this to print only one document. I have even set the form filter for the child database to recno()=current(rec(no)). I am truly stumped here. Any help is greatly appreciated.

    #2
    RE: Print Current Record Problem with Child Record

    Is the form you are printing based on the set or the child table? It should be based on the child table only. But, I would suggest printing a report and not a form. I have had problems printing forms in the past.

    Comment


      #3
      RE: Print Current Record Problem with Child Record

      Here is some code that I came up with that executes for the OnRowDblClick event of an embedded browse object. The envelopes report is based on the child table. I set the currentRecord variable to the record number of the child table(table.current(4)) and then filter by it in the report filter. Hope this helps.

      dim response as c
      dim currentRecord as c

      response = ui_get_radio("Select One", 1, "Print", "Preview")
      if (response = "Print") then
      goto print
      else if (response = "Preview") then
      goto preview
      else
      goto cleanup
      end if

      print:
      currentRecord = str(table.current(4).recno(), 10, 0)
      currentRecord = alltrim(currentRecord)

      :Report.print("Envelopes","between(recno(),"+ currentRecord + "," + currentRecord +")")
      goto cleanup
      preview:
      currentRecord = alltrim(str(table.current(4).recno(),10,0))
      :Report.preview("Envelopes","between(recno(),"+ currentRecord + "," + currentRecord +")")
      goto cleanup
      cleanup:
      parentform.resynch()
      end

      Comment


        #4
        RE: Print Current Record Problem with Child Record

        Thank you for the tip. I am trying to print a form defined for a set. This executed well in Alpha4. Seems Aplha5 has a problem in this area. I should not have to define a report but will take this as a possible last resort. Also, if I can define a form that has fields from parent and a child record, I should be able to print that form or any other form I invoke with the same fields and record selection. What am I missing here? It must be something very obvious! Help!

        Comment


          #5
          RE: Print Current Record Problem with Child Record

          "I should not have to define a report" - easier than it sounds. Start with a new blank report in design mode, select the report menu, bottom choice should be "import", choose your desired form, you're done.
          There can be only one.

          Comment


            #6
            RE: Print Current Record Problem with Child Record

            I'm going to try this. If it works, your my Alpha5 hero!

            Comment


              #7
              RE: Print Current Record Problem with Child Record

              Deb,

              Printing in Windows is VERY different than printing in DOS. The print support for Forms in Alpha Five is rudimentary. It will not print certain complex forms at all. The report engine is robust and flexible. My recommendation: use report layouts for your output, forms for your input. -- tom

              Comment


                #8
                RE: Print Current Record Problem with Child Record

                Your tip on importing a form to a blank report is great! Still working on printing the report correctly. Thanks.

                Comment


                  #9
                  RE: Print Current Record Problem with Child Record

                  I have taken the report avenue and still cannot print a data from a parent record and a "single selected" child record. Both forms and reports want to include data from all child records and print multiple outputs. The issue in not print control but rather record control for both parent and child tables. I really think this is an Alpha5 bug because I was able to do this rather easily in Alpha4.

                  Comment


                    #10
                    RE: Print Current Record Problem with Child Record

                    I have taken the report avenue and still cannot print data from a parent record and a "single selected" child record. Both forms and reports want to include data from all child records and print multiple outputs. The issue is not print control but rather record control for both parent and child tables. I really think this is an Alpha5 bug because I was able to do this rather easily in Alpha4.

                    Comment


                      #11
                      RE: Print Current Record Problem with Child Record

                      Your tip was real good but did not solve my problem. Record selection and control has the same problem in report printing as it does in form printing. I want data from a parent table and a "single selected" child table to print on a form or a report. This is a confirmation form to be sent to a guest who has more than one reservation.

                      Comment


                        #12
                        RE: Print Current Record Problem with Child Record

                        Deb,
                        The easiest way to do this is to define a reverse set. In other words, make a set where your current child is the parent and vice versa. This can be a 1:1 link. Make a report showing what you want to show.
                        To print it from a button have action scripting use the "value from the control on a form" make this the linking value that you want and run the report. This should take care of the problem.

                        Russ

                        Comment


                          #13
                          RE: Print Current Record Problem with Child Record

                          Hi Deb:

                          You wrote:

                          [I really think this is an Alpha5 bug because I was able to do this rather easily in Alpha4..]

                          In my opinion, this not a bug, I don�t think there is a problem. I can easily click on a button and print the current record [Parent and the appropriate Child Records] via a report. From my perspective this is not an Alpha Five issue.

                          At this point in time, I don�t think you are familiar with the Windows paradigm, so what you perceive as a bug, is really a lack of knowledge on your part. I am not saying this to be critical, because all of us went through that same learning curve when we switched from A4 to A5.

                          Incidentally, it appears as if other forum members are trying to point out that you should not try to print forms, it�s going to cause you far more problems than it�s worth.

                          Robert T

                          Comment


                            #14
                            RE: Print Current Record Problem with Child Record

                            Deb,

                            Here's a working example for you to tear apart.

                            Unzip the attachment to an empty folder. Open the only form. You'll find that it's based on a one to many set composed of Customers and Phones tables. The Print Current button previews a report based on the same set, using an action script that has two simple actions in it. The first builds a global variable containing the string equivalents of key fields culled from both primary and child table current records. The second preview the report using a simple filter expression to show only records that match the variable.

                            -- tom

                            Comment


                              #15
                              RE: Print Current Record Problem with Child Record

                              This sounds promising and I will try it now and let you know if it works. Thanks.

                              Comment

                              Working...
                              X