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

sort order in Report

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

    sort order in Report

    In my form I run a saved query with the sort order I want.
    In my Report it does not sort the same as my form.
    In my report under the option "Select Records" I have the "Base report on currently selected records"
    I have 2 group breaks, it does not sort in the detail area. It sorts by a different field ,
    In the pic is shows the fields, it is suppose to sort by the "weight" field then by the "New Item" field.
    the sort order is correct in the form/browse,
    to see how this is grouped, it is on the 1st 2 letters of the"New Item" field.

    in the next pic is the report. the red arrow on the left side point to a record that shows "1/2 oz", it is the smallest and should be at the beginning of this group, it is that way in the form/browse, but not in the report.
    the sort is based on the numeric field called "weight" in my report is displays the fraction as a char.

    I have went through all of the Properties in the report and here is a screenshot of the detail properties and the 2 group properties "Style" and "Size"
    when I use the "Size" group, it sorts like it should, but the Detail never sorts by the weight, always the "New Item" field.
    this has bugged me for years and I decided I would try to get it to work but it seems so simple but I can't get it to work.
    Attached Files
    David
    A5V12.3
    Win7, 64 bit
    Qbks 2018 Enterprise
    QODBC R/W

    #2
    Re: sort order in Report

    David,

    From what I can tell from your screenshots, 'size' is a character field, so is sorted alphabetically. Sort the group by weight and all should be OK.

    Comment


      #3
      Re: sort order in Report

      I am somewhat confused if the table shot is showing the records to be selected for the report, because the report does not show Banana Jig (BA) which ought to be next after Bullet Nose (B1) and not Buzz Bait (BZ).

      Also the coding you are using for the new_item field seems inconsistent for ordering the groups, unless you actually have a field named STYLE in this table that you are grouping this report by. The table view sort using Style (BB) + Size (1/16) is also using record number for the new_item ordering and is why it appears correct in your table but is actually not for the report. This is why the 1/2 size is not in the correct order on the report because it's record number is in a different sequence within the BB group. You might want to create an index so you can test it on the table when viewing the default browse.

      "Currently selected records" indicates there is a query/ filter in place, what does that filter look like? You might need a subreport in the detail section...
      Last edited by MoGrace; 07-14-2019, 11:25 AM.
      Robin

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

      Comment


        #4
        Re: sort order in Report

        sorry for the confusion, here is a new pic showing a more clear picture of what is going on.
        I didn't go into detail about the actual grouping because I didn't think it would matter. It is just another field with the group. in general it is based off the 1st and 2nd letters of the "New Item" field.
        the grouping works fine and it sorts in the right order.
        In the pic it shows outlined in red the browse and the report of a sample of the data that it not sorting correctly. and the sort it on the "weight" field and it is a numeric. the "weight" field does not display in the report
        Attached Files
        David
        A5V12.3
        Win7, 64 bit
        Qbks 2018 Enterprise
        QODBC R/W

        Comment


          #5
          Re: sort order in Report

          Just to throw in another idea, I think this has more to do with the group breaks than anything else.
          As the data is hopefully sample data, perhaps sharing as small portion of the table and report definition
          will give us a better chance of finding a solution.
          Gregg
          https://paiza.io is a great site to test and share sql code

          Comment


            #6
            Re: sort order in Report

            here is a zip file.
            when it opens click on the only button, then when the form opens click the query, then click the print preview. It shows the Report name "1Report" so it will be on top of the lists of reports.
            Attached Files
            David
            A5V12.3
            Win7, 64 bit
            Qbks 2018 Enterprise
            QODBC R/W

            Comment


              #7
              Re: sort order in Report

              Hi David,

              It took me a bit to get a query that resembled what you showed.
              I finally settled on left(style,2)="bu" to get the results shown in the attached pic.Capture.PNG.

              From what I can tell, it is now sorting by style, weight, and new_item.
              Gregg
              https://paiza.io is a great site to test and share sql code

              Comment


                #8
                Re: sort order in Report

                in your pic it is the same as mine, it is not sorting. the very bottom record is a 1/2 oz and it should be at the top of that group. and I put the numeric field in the report so you could see that it is not sorting.
                David
                A5V12.3
                Win7, 64 bit
                Qbks 2018 Enterprise
                QODBC R/W

                Comment


                  #9
                  Re: sort order in Report

                  Hey David,

                  Don't you hate when computers do what you instruct them to do, rather than what you want them to do.
                  The report is sorted by style, then weight, then new_item.
                  I'm guessing you really want it sorted by style, then size, then new_item.

                  The problem with sorting by size is you have defined size as a character value rather than numeric value, and
                  computer sort character values different than they sort numeric values.

                  I went through the table and changed the size for the items shown in the attached image to be decimal-based numeric.
                  I changed the report to show the size value rather than weight.
                  I set the report to sort by style, then size, then new_item.



                  2019-07-15_11-07-59.png
                  Gregg
                  https://paiza.io is a great site to test and share sql code

                  Comment


                    #10
                    Re: sort order in Report

                    Originally posted by madtowng View Post
                    Hey David,

                    The problem with sorting by size is you have defined size as a character value rather than numeric value, and
                    computer sort character values different than they sort numeric values.

                    [ATTACH=CONFIG]45985[/ATTACH]
                    I guess you mis-read what I said, the "Weight" field is what I am sorting by, NOT the "Size" field. the "Size" field is Character and the Weight field is numeric
                    David
                    A5V12.3
                    Win7, 64 bit
                    Qbks 2018 Enterprise
                    QODBC R/W

                    Comment


                      #11
                      Re: sort order in Report

                      Originally posted by madtowng View Post
                      Hey David,

                      Don't you hate when computers do what you instruct them to do, rather than what you want them to do.
                      The report is sorted by style, then weight, then new_item.
                      I'm guessing you really want it sorted by style, then size, then new_item.

                      The problem with sorting by size is you have defined size as a character value rather than numeric value, and
                      computer sort character values different than they sort numeric values.

                      I went through the table and changed the size for the items shown in the attached image to be decimal-based numeric.
                      I changed the report to show the size value rather than weight.
                      I set the report to sort by style, then size, then new_item.



                      [ATTACH=CONFIG]45985[/ATTACH]
                      I went back and re-read this and I think I misunderstood what you said. Yes I agree
                      David
                      A5V12.3
                      Win7, 64 bit
                      Qbks 2018 Enterprise
                      QODBC R/W

                      Comment


                        #12
                        Re: sort order in Report

                        Ok David...now you have me confused.
                        What sort order are you really trying to get ?
                        Gregg
                        https://paiza.io is a great site to test and share sql code

                        Comment


                          #13
                          Re: sort order in Report

                          Sorry,
                          I want to sort by the numeric "weight" field. that has never changed.
                          and that is the field that is selected in the query.
                          David
                          A5V12.3
                          Win7, 64 bit
                          Qbks 2018 Enterprise
                          QODBC R/W

                          Comment


                            #14
                            Re: sort order in Report

                            I'm sorry for the confusion but I have never said I wanted it sorted by the "Size" field.

                            In the browse it is sorted correct, but when I run the report it is not.


                            This is a new development:
                            If you would download my sample db again and edit the 1Report and delete the "Size" GROUP, save it and run the report again and the sample file on a different computer of mine finally worked, in the pic the numbers in Red are sorted correct.
                            Let me know if it works for you.
                            This is the sample file that I opened on a different computer.

                            Now, I opened my regular file on different computer, deleted the "Size" GROUP and it sorts correct.

                            I delete the "Size" GROUP in my regular computer and IT DOES NOT SORT CORRECT.
                            And you think your confused.
                            so no wonder after trying 50 different ways it was never going to work on my regular computer.

                            so now it works like i thought it should on a different computer but not my regular computer.
                            Both have Win7 64 bit

                            So in my mind there is some tmp file laying around that needs to be deleted.

                            I did restore my regular file in a different folder location and it still does not work.
                            I guess I will backup everything, uninstall and delete all files left over and re-install.
                            that should work shouldn't it?
                            Attached Files
                            David
                            A5V12.3
                            Win7, 64 bit
                            Qbks 2018 Enterprise
                            QODBC R/W

                            Comment


                              #15
                              Re: sort order in Report

                              Let's try this one.
                              I deleted the size group break.2019-07-15_14-28-23.png
                              Gregg
                              https://paiza.io is a great site to test and share sql code

                              Comment

                              Working...
                              X