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

Show First 10 Rows of Report

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

    Show First 10 Rows of Report

    Thank you to everyone that has helped me out with Alpha 5.

    Just have 1 question. Its taken me about 12 hours building 1 report with linked tables and summary totals learnings a fair bit along the way.

    I now have the report how I need it.

    Under the report Menu/Select Records there are 2 filters I have added. The first it checks a field of at table to see if it has the Character T in field so it shows that data only
    then its next job is to launch a date range message box so I can choose which records need to be shown from a date range. In here I can choose for this to show only the top 10 records
    but as soon as I do that the first filter is ignored and the data is not sorted with what I need eg T for True data only.

    Is there a quick way to add some code so the first 10 rows are shown only of the report?

    Thank You

    Joe

    #2
    Re: Show First 10 Rows of Report

    Joe,

    Check out this function to use as part of your filter TOP_RECORDS().

    How are you getting the Date range variables?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Show First 10 Rows of Report

      Hi Keith yep tried that but with my conditions combination it does not work.

      I have created 1 filter with 3 conditions.

      The 1st shows data from 1 field that has a letter in the field eg in this case T.
      I added another condition which is the from Date.
      I added another condition which has the to date.

      The data above is collected from a data set (linked Tables)

      These 3 work together. As soon as I choose the Top Records and add a number then it shows all data instead of performing the 1st condition.

      This took me hours and hours to figure out so basically had to do step by step until I worked it out.

      Its where I am at now.

      Thanks for replying.

      joe

      Comment


        #4
        Re: Show First 10 Rows of Report

        Show us the filter you're using.
        There can be only one.

        Comment


          #5
          Re: Show First 10 Rows of Report

          I think I worked this out but will still need your help.

          The data for the report is from a dataset I created linked by 1 field used on all linked tables.

          This dataset will only be used for this report.

          Is there a way that the data in the dataset only shows T fields rather than a mixture of T and F fields?

          This way the data in the dataset would be clean required data that shows fields with the T value only and then I can remove the condition that performs this task and add the Top Records function to the date conditions which this should then work.

          The question in this case if I open the dataset in design view and go directly to the field in question that shows the T and F fields how could I make this just show the T fields?

          Thanks Again

          Joe

          Comment


            #6
            Re: Show First 10 Rows of Report

            Unfamiliar with the terminology you are using, I am.

            If you are speaking of an Alpha set, you can enter a filter for the child table records in the set definition.
            There can be only one.

            Comment


              #7
              Re: Show First 10 Rows of Report

              Hi Stan,

              Ignore my last post.

              That did not work.

              This is the current filter I have:

              (( "T" $ Table_Staff->currently_employed ) ) .and. (Table_S->date_s >= var->AskD_From_Date ) .and. (Table_s->date_s <= var->AskD_To_Date )

              If I can add the top records into this so it shows lets say the first 10 and it all works that would be great.

              Thanks

              Joe

              Comment


                #8
                Re: Show First 10 Rows of Report

                The documentation says it would be

                top_records(10,(( "T" $ Table_Staff->currently_employed ) ) .and. (Table_S->date_s >= var->AskD_From_Date ) .and. (Table_s->date_s <= var->AskD_To_Date ))
                There can be only one.

                Comment


                  #9
                  Re: Show First 10 Rows of Report

                  Joe

                  Your original question sounds like you want to add more conditions to an existing filter.

                  Your script is using one filter then replacing the filter with another rather than combining them.

                  Stan's question about showing us what you're doing is spot on. We can help you much easier with that info.

                  edit: and of course we cross-posted. Thanks for the info.

                  I usually bring up a browse of the data(table or set) and use the query options to test filters until I get what I want.
                  Then either save the query and/or move the filter to the script...
                  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


                    #10
                    Re: Show First 10 Rows of Report

                    Joe,

                    Ask variables are a convenient way of obtaining user input for a report filter but they don't lend themselves to the power of some enhancements you will likely want to make later.

                    Most folks these days probably gather the user choices by having variables on a form or by prompting for them in an xdialog. The benefits to those strategies is that validation of the user input is easily accomplished and you can run the report filter against the table(s) involved as a query before the report is generated. If the query returns no records you warn the user their entries would generate an empty report.
                    There can be only one.

                    Comment


                      #11
                      Re: Show First 10 Rows of Report

                      Originally posted by Stan Mathews View Post
                      Joe,

                      Ask variables are a convenient way of obtaining user input for a report filter but they don't lend themselves to the power of some enhancements you will likely want to make later.

                      Most folks these days probably gather the user choices by having variables on a form or by prompting for them in an xdialog. The benefits to those strategies is that validation of the user input is easily accomplished and you can run the report filter against the table(s) involved as a query before the report is generated. If the query returns no records you warn the user their entries would generate an empty report.
                      How does Alpha 5 know which fields to work off if your using the X Dialog for example where I create the from date and to date pop up box?

                      Thanks Again for your help.

                      Joe

                      Comment


                        #12
                        Re: Show First 10 Rows of Report

                        Given your original filter, you display an xdialog and let the user enter the dates into two variables defined in the xdialog (say bdate and edate).

                        In the code section of the xdialog you use

                        report_filter = "(( \"T\" $ Table_Staff->currently_employed ) ) .and. (Table_S->date_s >= "+s_quote(var->bdate)+" ) .and. (Table_s->date_s <= "+s_quote(var->edate)+" )"

                        report.preview(your_reportName,report_filter)
                        There can be only one.

                        Comment


                          #13
                          Re: Show First 10 Rows of Report

                          Joe,

                          Do you know how to create a dialog box with the two variables Stan has suggested?

                          The next thing to consider is user control from the dialog. Making sure the user has entered a date in both boxes. The second date is after the first date and finally stopping the script if the user presses the Cancel button on the dialog.
                          Regards
                          Keith Hubert
                          Alpha Guild Member
                          London.
                          KHDB Management Systems
                          Skype = keith.hubert


                          For your day-to-day Needs, you Need an Alpha Database!

                          Comment


                            #14
                            Re: Show First 10 Rows of Report

                            Originally posted by Keith Hubert View Post
                            Joe,

                            Do you know how to create a dialog box with the two variables Stan has suggested?

                            No I don't. I think this will help though if anyone can assist please.

                            Thank you

                            Joe

                            Comment


                              #15
                              Re: Show First 10 Rows of Report

                              Hi Joe,

                              Try these two videos: http://screencast.com/t/MZgX7iWE and http://screencast.com/t/QYbzRb0Vm1

                              Hope they help you.
                              Regards
                              Keith Hubert
                              Alpha Guild Member
                              London.
                              KHDB Management Systems
                              Skype = keith.hubert


                              For your day-to-day Needs, you Need an Alpha Database!

                              Comment

                              Working...
                              X