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 browse record

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

    print current browse record

    I know this must be relatively simple but can't get it.
    I will try to keep the example simple.
    For sake of argument, 2 tables:
    Parent table named patient table (pt_t)
    child table named patient visit table (pt_vst_t)
    Set created: pt_s ; referential integrity; one to many relationship
    patient comes to office has many visits.

    I then created a form for data entry:
    patient form (pt_frm) based on pt_s.
    Top of form patient name, DOB, etc
    lower part of form is an embedded browse for patient visit data;
    fields in pt_vst_t: include date of visit, chief complaint, etc.

    I then created a report (pt_rpt) based on the pt_s.
    Header: patient name, DOB, age (from pt_t)
    Detail section: visit date, chief complaint, etc. (from pt_vst_t)
    Now the question:
    I put a button, on the form to print current record.
    However, it brings up all the visits for that patient.
    How can I make it so that I am printing/previewing report for that individual visit of that patient.
    Thanks

    #2
    Re: print current browse record

    Sounds like the button is filtering the report based on a field value in the parent table of your set. The term "current record" is a bit ambiguous in the context of a two table set. Might refer to either the current parent table record or might refer to the currently selected child table record. Tell us more about what you mean, and what the script looks like, when you "print current record".

    Are you trying to print a report for a single row in your embedded browse ?

    Comment


      #3
      Re: print current browse record

      Tom,
      Thanks for your reply.
      "The term "current record" is a bit ambiguous in the context of a two table set. Might refer to either the current parent table record or might refer to the currently selected child table record."

      Yes, "current record" is ambiguous in this context. So when I say I want the user to be able to print the current record, it would be the data from that specific visit date for that specific patient. If my report is based on that set (which I assume it would need to be since it is drawing data from both), then I can see how it would result in showing all the visits for that patient.

      "Tell us more about what you mean, and what the script looks like, when you "print current record"."

      There is another button on the form that is a print preview button. The on push function/script (from script genie) is the preview a layout choice; the selected layout is the report (pt_rpt) with it set to current record only.

      "Are you trying to print a report for a single row in your embedded browse ?"

      I guess in a sense I am trying to print a report for a single row in the embedded browse. But "single row" may be misleading as the info from that single row is a page on a form.
      Specifically, more about my form:
      Rather than using a subform (from pt_vst_t) on a main form (pt_t), the main form is based on the pt_s set. At the top of the form, the patient name is entered. Lower on the form, is the embedded browse that is based on the pt_vst_t. I have a button (done with script genie: open embedded browse "companion form"; companion form method- add new record), next to the embedded browse that brings up a companion form (pt_vst_f) and the user enters the data there.
      So in summary, I need for the "current record" to be for that browse "row" for that patient.
      Thanks much.

      Comment


        #4
        Re: print current browse record

        In your situation, the print current record action uses a filter (query) based on the record number of the current parent table record in your two table set. This is the same scenario as the "print current invoice" button on the Invoice form of the AlphaSports sample database that ships with Alpha Five.

        To limit the set based report to a single child table record you have two options:

        a) change the filter used in the query so that both tables are filtered in the query; or

        b) base your report on an inverted set, and filter the records in that set by the desired visit table record.

        I think option b is easier for most. Have you given it a try?

        Comment


          #5
          Re: print current browse record

          Tom,
          Thanks for your help.
          option b sounds good. Unfortunately, I don't know what an inverted set is.
          Please advise.

          Comment


            #6
            Re: print current browse record

            Doug, by "inverted set" I meant a set in which the order of tables is inverted. The child becomes parent, linked 1:1 to the former parent, which is now child. This flattens the data for you. Suggest you create such a set and then view it with the "default browse" which Alpha will build for you. Then create a new report based on this set.

            Comment


              #7
              Re: print current browse record

              Tom,
              I am in the process of trying to do that but have encountered an unusual error. When I create the set and then try to add the child table, I get the error message:
              "Could not create/edit link. It is possible that the child table was opened in another session. Alpha Five needs exclusive access to the child table. Ty exiting from Alpha Five and then create link again.
              Internal error message was: Not an open table."
              I have closed the db, and a5, then restarted a5 and reopened the db. Only thing visible is control panel. Then tried to create new set as above but I keep getting this message. I don't see any open windows on my a5 interface including forms, reports, codes etc. I am stumped. Suggestions?

              Comment


                #8
                Re: print current browse record

                Tom,
                Re: above internal error message, I shut down the computer/restarted computer, then reopen a5 and db and now am able to create that inverted set without that message.
                I will now try to do what you suggested above to be able to print the desired output.

                Comment


                  #9
                  Re: print current browse record

                  From the Alpha Five control panel choose tables/sets tab. Click File menu, then choose "Database Information". Does the display show any "open" tables?

                  Edit - Ok, I see now you've cleared the "open table" issue by rebooting the machine. Tables will be "left open" even after a form closes if the form is displayed as "dialog". They can also be "left open" by scripts that crash during development.
                  Last edited by Tom Cone Jr; 12-17-2009, 07:22 AM.

                  Comment


                    #10
                    Re: print current browse record

                    Tom,
                    Got the desired results with inverted set. Really appreciate your help!

                    Comment

                    Working...
                    X