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

Filtering a Report

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

    Filtering a Report

    Hello Everyone,

    I have one report in an application that was designed with this filter:

    (Job_number = Var->FruitJobP ) .and. (Steam_Ship_Line = Var->OH_OS_D )

    The report and filter works fine.

    Now the report has more requirements. It needs to filter on 11 fields, whereby if there is data in one of the fields, or 3 , or all of them, the report will only print records, that have data in these fields.

    So I tried this:

    (Job_number = Var->FruitJobP ) .and. (Steam_Ship_Line = Var->OH_OS_D ) .AND. isnotblank("Plts_over") .AND. isnotblank("Plts_short") .AND. isnotblank("A_except") .AND. isnotblank("B_except") .AND. isnotblank("C_except") .AND. isnotblank("D_except") .AND. isnotblank("E_except") .AND. isnotblank("F_except") .AND. isnotblank("G_except") .AND. isnotblank("H_except") .AND. isnotblank("J_except")

    Alpha did not like this.

    Is this the right approach, with this many fields? Not sure if I am on the right track.

    Thanks Ed

    #2
    RE: Filtering a Report

    >>Alpha did not like this.

    Comment


      #3
      RE: Filtering a Report

      I would suggest trying to write out the filter in "plain English" first, without worrying about the proper syntax, then try to convert it.

      I think you will see that it is a very complicated filter you are trying to construct as you will need to test for 6,227,020,800 possible combinations. (13*12*11........)
      There can be only one.

      Comment


        #4
        RE: Filtering a Report

        Ed:

        I don't like working with "not".
        Try breaking the process into two parts.

        if(Plts_over = "" .or.Plts_short = "" .or.A_except ="".or. B_except="" .or. C_except="".or.D_except="" .or. E_except="" .or. F_except="" .or. G_except="" .or. H_except="" .or. J_except="" then

        vl_Data = .F.

        else

        vl_Data = .T.

        end if

        (Job_number = Var->FruitJobP ) .and. (Steam_Ship_Line = Var->OH_OS_D ).and. vl_Data = .T.

        I hope this helps.

        bob adler

        Comment


          #5
          RE: Filtering a Report

          Hello Everyone,

          DAH on my part for .AND.

          First thanks for all the suggestions. I was not sure if there was an easier way to reference all the associated fields, that it needs to filter on.

          Just a thought, can a wild card be used for all the fields that end in "_EXCEPT" like "*_EXCEPT", or do they explicitly have to be listed in the expression? Think I know the reply, but like everything else I want to make sure.

          I will try your suggestions.

          Thanks Ed

          Comment


            #6
            RE: Filtering a Report

            Sure would be nice....... kind of.....

            but as far as I know not in this world.
            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


              #7
              RE: Filtering a Report

              Guess I need a pass to Disneyland.

              Thanks Al

              Comment


                #8
                RE: Filtering a Report

                Good Morning All,

                Well I think Ray was right I did not give you enough info.
                And Stan, made me think a bit more when I was pondering over this at home last night, trying to come up with the right expression.

                These 11 fields, that I am trying to filter on, are all numeric. I did not get very far on my own, using "isnotblank". So thanks to the Genie, I tried "between". Actually using the between the figures should be probably be 1 thru 999 or so, but picked 2000, instead of 999 just in case.

                I tried to make the filter make sence like Stan said, in Plain english, so this is what I came up with:


                (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->Plts_over,1,2000)) .OR. (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->Plts_short,1,2000)) .OR. (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->A_Except,1,2000)).OR. (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->B_Except,1,2000)).OR. (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->C_Except,1,2000)).OR. (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->D_Except,1,2000)).OR. (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->E_Except,1,2000)).OR. (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->F_Except,1,2000)).OR.
                OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->G_Except,1,2000)).OR.
                OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->H_Except,1,2000)).OR.
                OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(between(OH_MAIN->J_Except,1,2000))

                As I added to the filter, I was OK to a point, but as it got longer and longer, ALPHA would not "parse" the filter after a point.

                So like Robert Adler tried to help me yesterday with isnotblank shortening the expression up. I am not educated enough to make this short and sweet so the filter will work correctly.

                Am I on the right track, or am I way off in left field somewhere??

                Any help would be appreciated Ed


                Comment


                  #9
                  RE: Filtering a Report

                  Ed

                  Remember the story about the swamp and the alligators?

                  It's hard to remember that you're trying to drain the swamp when all the alligators get in the way.

                  When I find that the code is getting so long and complicated, I look for a different design to drain the swamp.

                  You may need to look at the select....case or some other method of doing your task. I don't think you'll like the maintenance of a long if statement that is this hard to build.
                  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: Filtering a Report

                    Hello Al

                    I will keep trying thanks for the tips. Appreciate the direction.

                    If anything, I fill up the message window here, and the genie window in Alpha.

                    Ed

                    Comment


                      #11
                      RE: Filtering a Report

                      Here is the working end result:


                      (OH_MAIN->Job_number=Var->FruitJobP).and.(OH_MAIN->Steam_Ship_line=Var->OH_OS_D).AND.(Plts_Over+Plts_Short+A_Except+B_Except+C_Except+D_Except+E_Except+F_Except+G_Except+H_Except+J_Except)0


                      Kinda short & sweet.

                      Ed

                      Comment

                      Working...
                      X