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

Limit number of records to print on report

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

    Limit number of records to print on report

    I have a report name "Medical" I need the report to print the lastest 6 records "DUE: This would apply to Injections, Wormer and Weight.
    The records are in an embeded browse on a tabed form labeled Medical.
    The events for the browses are onArrive "Quick sport-sort record, placing the last dates at the top of the browse.

    I check the help file and looked at count(). I can't make it work.
    Any help would be great.
    Attached is my application.

    Jim

    #2
    Re: Limit niumber of records to print on report

    I think this can be done by marking the desired child table records first, then using the marks in filter expressions in each of three subreports. Each subreport to be based on a separate child table.) In limited testing here was unable to get top_records() or bottom_records() to work with subreports. However, a filter based on marked() works fine.

    -- tom

    Comment


      #3
      Re: Limit niumber of records to print on report

      Tom.
      Remember I have been using ALPH 5 for only 4 months.
      You will have to explain your suggestion to me a little more.
      Jim

      Comment


        #4
        Re: Limit niumber of records to print on report

        Jim,

        I see "Due" for Injections.
        I see "Wormer_Due" for Wormer
        I don't see "Due" for Weight.

        what am I missing? Which Weight records do you want included in the report, which do you want excluded?

        Your set includes 3 child tables, each linked one to many back to the parent table. I understand you want to limit the number of records included in the report for each child table. Is that right?
        Last edited by Tom Cone Jr; 04-30-2007, 07:20 AM.

        Comment


          #5
          Re: Limit niumber of records to print on report

          There is no due for weight. Want the lastest 5 or 6 records for "Date".

          Yes, 3 child tables linked to the parent.

          Yes, I want to limit the number of records included in the report for each child table. Look at the medical report, I want it to show the lastest 5 or 6 records .
          Under heading Injections show: date, injections, due - sorted by lastest due
          Under heading wormer- show: date, wormer and due - sorted by lasted due
          Under heading weight- show date and weight - sort by lastest date.

          I have the sorts working from the form medical and prints correct on the report but I need to limit the records on the report as there may be a large number of records in the tables over the years of record keeping.
          Jim

          Comment


            #6
            Re: Limit niumber of records to print on report

            My idea would be to run a script that would preprocess the child table records marking records that should appear in the report and unmarking all the others. The fields you want to display from each child would be placed in a subreport, and the subreport would be filtered to include only marked records. This is a brute force solution. There may be other (better) ideas, so let's see if someone else suggests a better approach.

            Comment


              #7
              Re: Limit niumber of records to print on report

              I have been trying "Top_Records()"
              Syntax: Filter_Expression as C = TOP_RECORDS (Quanity as N [,Filter as c ])
              Get error: Invalid or incomplete expression.
              Not sure if I have the description right in the arguments.

              I placed this filter in the "Detail Properties" in the field for 'Expression Filter" on the report. This may be totally wrong but isn't this where you filter the records that you want printed?
              Jim

              Comment


                #8
                Re: Limit niumber of records to print on report

                Put 3 subreports in your report each based upon each of the child tables. You can't just put the fields in the detail section as you have for this purpose. Then try using this filter in each of the subreports:

                BOTTOM_RECORDS()

                Syntax:

                Filter_Expression as C = BOTTOM_RECORDS( Quantity as N [, Filter as C ] )


                - - - or maybe top_records()?
                Peter
                AlphaBase Solutions, LLC

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


                Comment


                  #9
                  Re: Limit number of records to print on report

                  Peter,
                  You suggestion of sub reports was great-makes for a better report.

                  However I tried the TOP_records for a filter on table "injection". When you save the report and then go back and look at the filter- the table is greyed out and shows the table as "llama". When opening the report it starts counting records into thousands and you have to abort.

                  Where did I go wrong?
                  Jim

                  Comment


                    #10
                    Re: Limit number of records to print on report

                    Originally posted by jdoyle View Post
                    Where did I go wrong?
                    Not sure, Jim. Do you have the subreport based upon each child table? The filter in each subreoport should be something like: scanning("child table name") .and. top_RECORDS( Quantity as N [, Filter as C ] ) - - - something like that
                    Peter
                    AlphaBase Solutions, LLC

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


                    Comment


                      #11
                      Re: Limit number of records to print on report

                      Yes, sub report base on each child table.
                      Tried the filter and it is obvious that I don't know what I am doing.
                      Attached is database
                      Jim

                      Comment


                        #12
                        Re: Limit number of records to print on report

                        Peter, as reported above, your idea is exactly what I attempted last night without success. I've sort of half way concluded that top_records() is limited to filters on the primary table, and cannot be used when defining a filter for a child table. Would like very much to be proven wrong, but can't spend any more time on it.

                        -- tom

                        Comment


                          #13
                          Re: Limit number of records to print on report

                          Jim,

                          You have dates for these records. Would it not be easier to print the records that fall between 2 dates? That filter would definitely work.

                          I can get the subs to work fine,but cannot find the functions that have been proposed anywhere. I am sure they are there, but not for me.


                          I have changed a few things, maybe from there???

                          Dave
                          Last edited by DaveM; 04-30-2007, 02:58 PM.
                          Dave Mason
                          [email protected]
                          Skype is dave.mason46

                          Comment


                            #14
                            Re: Limit number of records to print on report

                            Originally posted by Tom Cone Jr View Post
                            Peter, as reported above, your idea is exactly what I attempted last night without success. I've sort of half way concluded that top_records() is limited to filters on the primary table, and cannot be used when defining a filter for a child table.
                            Sorry, Tom. I missed your post somehow. Bummer that doesn't work!
                            Peter
                            AlphaBase Solutions, LLC

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


                            Comment


                              #15
                              Re: Limit number of records to print on report

                              Peter, this was my first experience trying to use top_records() or bottom_records() so I'd welcome another try by someone else in case I was doing something stupid.

                              Comment

                              Working...
                              X