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

Filter Report using Check-Box List-Box xdlg

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

    #31
    Re: Filter Report using Check-Box List-Box xdlg

    g, sounds as though you're having trouble adapting the AlphaSports example script to your database. Can't help you further without seeing your database and your implementation of the script that works in AlphaSports.

    An easy adaptation to preview the customer list report in alphaSports would change the corrected script I posted would look something like this... at the very end of the script:

    Code:
    'now use filter in query against Customer table
    'after the script is run open the default browse for this table to 
    '    verify that the query ran correctly.
    't = table.open("Customer")
    'query.options = "MT"
    'query.order = "Bill_city"
    'query.filter = filter
    'idx = t.query_create()
    't.close()
    
    report.preview("Customer List",filter,"Bill_City")

    Comment


      #32
      Re: Filter Report using Check-Box List-Box xdlg

      As Tom, I don't know what else to suggest either.

      I can confirm that the latest rendition of Tom's script (apart from removing the ",local_variables()" from the message text line) works. ie It results in a report preview. As did report.preview() and preview_report() with my test form.
      Tim Kiebert
      Eagle Creek Citrus
      A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

      Comment


        #33
        Re: Filter Report using Check-Box List-Box xdlg

        Thanks Tom & Tim.
        I am still working on this script. I can't quite understand why it works in alphasports but not on my DB.

        I re-wrote the script and replaced Tom's routine with a different expression that transforms the crlf() into a srteamed string with field='...".or.field='...'
        still no luck.

        I deleted and re-created a new report in case the report is corrupted: no luck.

        Tried to run it on a different report and a different table: no luck.

        Maybe every table and every report in my DB is corrupted, but when you hard-code the filter, the script runs great ! So, it's neither the tables nor the reports.

        Compacted the DB: no luck.

        Tried every expression to eval filter, quote it, unquote it etc.: no luck

        The script is stuck on one problem: the filter. I keep getting "invalid report filter". How is it invalid in my DB yet valid in alphasports?!

        This one of the most annoying things when things don't workwith no clear reason why and I am not in the mode to keep fighting with it.

        Comment


          #34
          Re: Filter Report using Check-Box List-Box xdlg

          g,

          I am willing to help, but need the working model of your database and directions to the specific script in question. Years of experience in this message board has taught me the futility of trying to debug someone else's code without being able to see it or the data it's manipulating. Won't do it.

          -- tom

          Comment


            #35
            Re: Filter Report using Check-Box List-Box xdlg

            Tom:
            Here is a bare bone greatly simplified copy of the table I am working on.
            It's self-explanatory.
            Thanks
            Last edited by G Gabriel; 05-11-2007, 05:19 AM.

            Comment


              #36
              Example

              Here you go.

              Comment


                #37
                Re: Filter Report using Check-Box List-Box xdlg

                Tom:
                The script runs just fine if you run it from the code tab, but try to put this script on the form (or click the button I have on the form), if you do that or if you want to run the script from a custom menu for example, you still get the error message.

                I place a button on the form to run the saved script: same result. I tried to run it from a custom menu: same. I made the variables global, it did not change anything.

                Something in the back of my mind reminds me of such problem but I can't just remember why a script would run from the code tab but not from anywhere else!

                Comment


                  #38
                  Re: Filter Report using Check-Box List-Box xdlg

                  Now I got it working on the button on the form in the test table, but not in my DB ??? I keep getting the same error message: "invalid filter expression" !!

                  Comment


                    #39
                    Re: Filter Report using Check-Box List-Box xdlg

                    g,

                    running your sample as supplied I confirm that the error is 'filter expression not logical'.

                    To get the report to preview I commented out this line:
                    Code:
                    'filter="\""+var->filter+"\""
                    Edit: Sorry g, too slow, you're obviously past this point.
                    Tim Kiebert
                    Eagle Creek Citrus
                    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                    Comment


                      #40
                      Re: Filter Report using Check-Box List-Box xdlg

                      Tom/Tim:
                      I can't thank you enough for working on this. I found the culprit! I had suspected it early on and I thought I did the necessary precautions to avoid it, but evidently not.

                      The problem is, working with a process of elimination, the report I was printing is based on a set. When I changed the report to one that is based on a table, it worked. Unfortunately, I have to have a report that is based on the set.

                      I did change the pointers in the script to point to the proper field, for example instead of using "item=" I used a full reference "table_name->item" but still kept getting those error messages.

                      Now, if I could figure a way to run the script for a report based on the set, that will be great. Maybe "->" is not the proper pointer. Maybe I need to try "@".

                      I will play with that and if you have other suggestions, I greatly appreciate it.
                      What a bomber!
                      Thanks

                      Comment


                        #41
                        Re: Filter Report using Check-Box List-Box xdlg

                        By the way... the speed is blazing !

                        Comment


                          #42
                          Re: Filter Report using Check-Box List-Box xdlg

                          Now, I could go to sleep !

                          I used the same pointer "->" for a report based on a set and it worked. I debugged my script and I had too many quations in it!

                          Thanks again!

                          Comment


                            #43
                            Re: Filter Report using Check-Box List-Box xdlg

                            Originally posted by G Gabriel
                            I debugged my script and I had too many quations in it!
                            Scoured the help file for quations but couldn't find a reference to it. But by your reckoning having too many of them is not good.

                            Glad you got it worked out.

                            PS Sleep well and don't let the quations bite :D
                            Tim Kiebert
                            Eagle Creek Citrus
                            A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                            Comment


                              #44
                              Re: Filter Report using Check-Box List-Box xdlg

                              Tom and Tim:
                              I just came upon this thread in my efforts to print some multiple selected records and just want to thank you all for a great solution. This should definitely be in the archives as an example of using the multiple selection process. It works great in V8.

                              Thanks again.

                              Pete Schuder
                              "Ollie, remember how dumb I used to be? Well, I'm much better now."

                              Pete

                              Comment

                              Working...
                              X