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

Printing Report Filter Criteria

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

    Printing Report Filter Criteria

    Hi,

    I have logical fields that I use to create filters for reports. No problem there. I would like to be able to print these choices out on the top part of the first page of the report as a list such as the following:

    Company:
    Apollo Machine
    BeenThere DoneThat
    Help, Inc

    Products:
    Nuts
    Bolts
    Screws

    Etc.

    All of the above would be the filters chosen for the report via checkboxes on forms. As I said the filters are no problem...I want to capture these and put them into a list. Some direction I should be looking in would be great as have not found anything yet to do this. I could query every form (table) used for filters for checkboxes that are true and then loop through each form (table) to obtain the items used as filters--just seems a whole lot of work and possibly very slow too. I am using a current software that does this instantly so there must be a way for Alpha to accomplish this feat I would think.



    Thanks.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




    #2
    Re: Printing Report Filter Criteria

    Can you parse what you want out of

    SYSTEM->Current_Filter
    There can be only one.

    Comment


      #3
      Re: Printing Report Filter Criteria

      Stan,
      Thanks--never even looked there. But all it gives me is one .t. value when placed anywhere on the report (or form). I guess I don't know how to use it and so far can't find out much info regarding it...will keep looking as it does seem to be the route to go.
      Mike
      __________________________________________
      It is only when we forget all our learning that we begin to know.
      It's not what you look at that matters, it's what you see.
      Henry David Thoreau
      __________________________________________



      Comment


        #4
        Re: Printing Report Filter Criteria

        Mike

        Show us how you create those filters.....
        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


          #5
          Re: Printing Report Filter Criteria

          Hi Al,

          Here is the script that determines the filters that I wish to gather into a list. I hope this will be enough but if need be I will get together a sample for all to see but it is really quite a mess currently!



          Code:
          dim Prd_cnt as n
          Prd_cnt= tablecount("prod","Prodchbox")
          if Prd_cnt = 0 then
            rvProd=".not. Prod->Prodchbox"
           else
            rvProd="Prod->Prodchbox"
          end if
          
          dim Com_cnt as n
          Com_cnt= tablecount("client_info","client_chb")
          if Com_cnt = 0 then
            rvComp=".not. Client_Info->Client_chb"
           else
            rvComp="Client_Info->Client_chb"
          end if
          
          dim PType_cnt as n
          PType_cnt=tablecount("sel_prod_type","Chbx_Ptype")
          if PType_cnt=0 then
             rvPrd_Type=".not. sel_prod_type->Chbx_Ptype"
           else
             rvPrd_Type="sel_prod_type->Chbx_Ptype"
          end if
          
          dim ComType_cnt as n
          ComType_cnt=tablecount("selcomptype","Selcom_Chb")
          if ComType_cnt=0 then
             rvCmp_Type=".not. selcomptype->Selcom_Chb"
           else
             rvCmp_Type="selcomptype->Selcom_Chb"
          end if
          
          
          
          query.filter = rvComp +".and."+ rvPrd_Type +".and."+ rvCmp_Type +".and."+ rvProd
          query.order = "recno()"
          :Report.Preview("APT_Inc",query.filter,query.order)
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #6
            Re: Printing Report Filter Criteria

            Originally posted by MikeC View Post
            Stan,
            Thanks--never even looked there. But all it gives me is one .t. value when placed anywhere on the report (or form). I guess I don't know how to use it and so far can't find out much info regarding it...will keep looking as it does seem to be the route to go.
            Mike

            You'll see .t. when there isn't a filter in place. Are you putting this field on a report and then running it through your normal process of setting the filter and then previewing the report?
            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: Printing Report Filter Criteria

              Hi Al,

              Yes to both questions--I am now getting my actual filter; i.e., Client_Info->Client_chb .and. .not. sel_prod_type->Chbx_Ptype .and. .......

              I think it is time to clean up my report filter form and such to be able to post a sample for all.

              Thanks for your time so far.
              Mike
              __________________________________________
              It is only when we forget all our learning that we begin to know.
              It's not what you look at that matters, it's what you see.
              Henry David Thoreau
              __________________________________________



              Comment


                #8
                Re: Printing Report Filter Criteria

                Here is a stripped down sample of my db with the report filter form and one basic report. The report filter form will load on startup. The "System Filter" button brings up the report using the variable filters determined by the filter criteria used on the left side of the form (not all work currently but most). The "Hard Coded" button has a single company used as a filter which brings up the report.

                Hopefully this will give someone the insight to put me on track as to how I can accomplish my goal of creating a filter criteria list.

                Mike
                __________________________________________
                It is only when we forget all our learning that we begin to know.
                It's not what you look at that matters, it's what you see.
                Henry David Thoreau
                __________________________________________



                Comment


                  #9
                  Re: Printing Report Filter Criteria

                  Might this be as simple as building a character string containing text you define in the script to describe the filter? As the script builds the filter expression, it adds new text to the string.
                  Last edited by Tom Cone Jr; 06-29-2007, 01:16 PM.

                  Comment


                    #10
                    Re: Printing Report Filter Criteria

                    Hi Tom,

                    It would be if I was choosing or entering each Client or Product name one at a time or through a script..but these choices are the result of simply using logical checkboxes and any that are true are to be included in the query filter. The checkboxes are on various forms and variables are used to create the final filter as the script shows.

                    As you for sure know, this seemed to an "easy" question and now I realize that it must not be as in so many cases! If there is no way to do this as my filter is created I guess I would need to know of other ways to create my filter so as to be able to do this...sort of work backwards then from a method to create the list to how the filter is created. Just a rambling thought....
                    Mike
                    __________________________________________
                    It is only when we forget all our learning that we begin to know.
                    It's not what you look at that matters, it's what you see.
                    Henry David Thoreau
                    __________________________________________



                    Comment


                      #11
                      Re: Printing Report Filter Criteria

                      I'll hazard a guess as to implementing Tom's suggestion, borrowing from your original script ...

                      dim global list as c
                      list = ""

                      dim Prd_cnt as n
                      Prd_cnt= tablecount("prod","Prodchbox")
                      if Prd_cnt = 0 then
                      rvProd=".not. Prod->Prodchbox"
                      else
                      rvProd="Prod->Prodchbox"
                      list = list +"RVPROD"
                      end if

                      dim Com_cnt as n
                      Com_cnt= tablecount("client_info","client_chb")
                      if Com_cnt = 0 then
                      rvComp=".not. Client_Info->Client_chb"
                      else
                      rvComp="Client_Info->Client_chb"
                      list = list + crlf() + "RVCOMP"
                      end if


                      Then put the global variable list on the report.
                      There can be only one.

                      Comment


                        #12
                        Re: Printing Report Filter Criteria

                        Thanks Stan.

                        But what that gives me is just the variable name rvProd or modifying it with a .text or .value the filter such as Prod->Prodchbox. I need to know what products such as Bolts, Nuts, etc are being used as the filter - and these are chosen with the filter criteria of when their checkboxes are true. So I need to be able to able to show or to see what products, companies, etc are chosen and not the filter itself.
                        Any other ideas?? If not, I guess I may have to go the long route and do a query on each table for True checkboxes and get the Product, Company, etc names that way. Am going to hold off doing that for a while though as I still think there has to be a way to do what I want more easily..I mean my current 12 year old software can do it (has to be a short way as it is instant) so I would hate to think Alpha can't!!
                        Mike
                        __________________________________________
                        It is only when we forget all our learning that we begin to know.
                        It's not what you look at that matters, it's what you see.
                        Henry David Thoreau
                        __________________________________________



                        Comment


                          #13
                          Re: Printing Report Filter Criteria

                          Originally posted by MikeC View Post
                          ..I mean my current 12 year old software can do it (has to be a short way as it is instant) so I would hate to think Alpha can't!!
                          Mike

                          You are stretching the definition of the word filter.....

                          You'll need to build a script/function to do what you want. I'd build a list of what the filter criterion is (like Stan did) and then use that to check each of the tables to get the actual names that are associated with it. Once written, it'll run in the blink of an eye..
                          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


                            #14
                            Re: Printing Report Filter Criteria

                            Mike, I'm not seeing the problem.

                            You can put any string of text you want in to Stan's list variable.

                            Code:
                            dim global list as c
                            list = ""
                            dim Prd_cnt as n
                            Prd_cnt= tablecount("prod","Prodchbox")
                            if Prd_cnt = 0 then
                                rvProd=".not. Prod->Prodchbox"
                               [COLOR="Red"] list = list + "Include records where ProdChbox is false" + crlf()[/COLOR]
                            else
                                rvProd="Prod->Prodchbox"
                                [COLOR="Red"]list = list + "Include records where Prodchbox is true" + crlf()[/COLOR]
                            end if

                            Mike, if this doesn't get it for you, then it's likely Stan and I are misunderstanding your situation, so post sample tables, forms, and point us to the script that runs the report.

                            Comment


                              #15
                              Re: Printing Report Filter Criteria

                              Tom

                              Your idea is fine, it just needs to go one step farther.. What I hear Mike asking for is a process that will list those products where the flag is true (or false) - ie

                              Code:
                              list = list + "Include records where Prodchbox is true" + crlf()
                              is replaced by
                              
                              list = list + table.external_record_content_get(<fill in parameters>)
                              or in one of the cases...
                              Code:
                              list = list + table.external_record_content_get("prod","Prod_Name","Prod_Name","Prodchbox")
                              or the not case..
                              Code:
                              list = list + table.external_record_content_get("prod","Prod_Name","Prod_Name",".not. Prodchbox")
                              Last edited by Al Buchholz; 06-29-2007, 03:43 PM. Reason: added example from the posted db from Mike.
                              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

                              Working...
                              X