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 an Excel export operation

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

    Filter an Excel export operation

    Hello all,

    I have a 1 to many set, with only 1 child table.

    There is an export EXCEL operation.

    The operation works fine, except that I do not want to export blank child records, and the filed in the child field "rollno" is the controlling factor for the filter.

    The variable below works fine, but when I add isnotblank or try an if statement, I get zero records exported.

    Job_Number=Var->DischJob + isnotblank("Disch_Paper_Osd->Rollno")

    Am I trying to filter it incorrectly?

    Any help is greatly appreciated.

    Ed

    #2
    Re: Filter an Excel export operation

    Originally posted by Ed Barley View Post
    Hello all,

    I have a 1 to many set, with only 1 child table.

    There is an export EXCEL operation.

    The operation works fine, except that I do not want to export blank child records, and the filed in the child field "rollno" is the controlling factor for the filter.

    The variable below works fine, but when I add isnotblank or try an if statement, I get zero records exported.

    Job_Number=Var->DischJob + isnotblank("Disch_Paper_Osd->Rollno")

    Am I trying to filter it incorrectly?

    Any help is greatly appreciated.

    Ed
    The linking expression should be .and., not +.

    Job_Number=Var->DischJob .and. isnotblank("Disch_Paper_Osd->Rollno")
    There can be only one.

    Comment


      #3
      Re: Filter an Excel export operation

      Hi Stan,

      I chokes with the .and. also. I should have put that in my post.

      Not sure where to go from here.

      Ed

      Comment


        #4
        Re: Filter an Excel export operation

        Originally posted by Ed Barley View Post
        Hi Stan,

        I chokes with the .and. also. I should have put that in my post.

        Not sure where to go from here.

        Ed
        What is the data type of rollno? If it is a numeric field, never populated, it should evaluate with isnotblank(). If it is populated/initialized with a value it will not.

        IOW a blank numeric field is blank. If you can see a zero in the default browse, it is not.
        There can be only one.

        Comment


          #5
          Re: Filter an Excel export operation

          try this:

          Job_Number=Var->DischJob .and. Disch_Paper_Osd->Rollno > ""
          or
          Job_Number=Var->DischJob .and. Disch_Paper_Osd->Rollno > 0 'if numeric

          if that won't work, try:

          "Job_Number=" + quote(Var->DischJob) + ".and. Disch_Paper_Osd->Rollno > '' "
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


            #6
            Re: Filter an Excel export operation

            Hi Stan & Martin,

            Sorry I did not get back to you right away, as a personal emergency came up.

            It is a character field.

            I tried Martin's suggestions, and could not get them to work.

            I have tried the following code, that I had used in a calc field in a report.

            Job_Number=Var->DischJob .AND. Disch_Paper_Osd->Rollno = if(Disch_Paper_Osd->Rollno>"","Disch_Paper_Osd->Rollno","")

            It gives me the opposite results(Only exports the child fields that have blank child records). If I reverse the IF statement, it gives me 0 records exported.

            It is close, but I can not figure out how to reverse the code to give me only the records that contain info in the rollno child field.

            Ed

            Comment


              #7
              Re: Filter an Excel export operation

              Originally posted by Ed Barley View Post
              Hi Stan & Martin,

              Sorry I did not get back to you right away, as a personal emergency came up.

              It is a character field.

              I tried Martin's suggestions, and could not get them to work.

              I have tried the following code, that I had used in a calc field in a report.

              Job_Number=Var->DischJob .AND. Disch_Paper_Osd->Rollno = if(Disch_Paper_Osd->Rollno>"","Disch_Paper_Osd->Rollno","")

              It gives me the opposite results(Only exports the child fields that have blank child records). If I reverse the IF statement, it gives me 0 records exported.

              It is close, but I can not figure out how to reverse the code to give me only the records that contain info in the rollno child field.

              Ed

              Code:
              Disch_Paper_Osd->Rollno = if(Disch_Paper_Osd->Rollno>"","Disch_Paper_Osd->Rollno","")
              this says

              Disch_Paper_Osd->rollno = if Disch_Paper_Osd->rollno is empty, "The literal text Disch_Paper_Osd->rollno", otherwise blank. IOW you don't need the quotes around the expression inside the if.

              Code:
              Job_Number=Var->DischJob .AND. Disch_Paper_Osd->Rollno = if(Disch_Paper_Osd->Rollno>"",Disch_Paper_Osd->Rollno,"")
              There can be only one.

              Comment


                #8
                Re: Filter an Excel export operation

                Hello Everyone,


                I still have not been able to get this to filter with a field in the child table. As in the post above it filters fine with the ask variable(I changed it from a var) in the parent table. The ask var job number is 84519, in the excel export.

                I have tried isnotblank, Martin's and Stan's suggestions.

                Please find attached a stripped down zip file of this portion on the Db.

                Any help would be greatly appreciated

                Ed

                Comment


                  #9
                  Re: Filter an Excel export operation

                  This works....
                  Last edited by G Gabriel; 05-11-2007, 05:17 AM.

                  Comment


                    #10
                    Re: Filter an Excel export operation

                    Hi Gabe,

                    Thanks for your input.

                    The problem is, when I try to filter on the child table in the set, not just the parent. Testing, filtering on the parent works fine each time.

                    What I am trying to do, is only export the child records, that have roll number data in them, and filter out the blank roll number records. So far I have failed.

                    That is my basic problem. If I use the genie, the genie only offers fields in the parent and not from the child. I wonder if ?????? it's not possible?????? the way things are going????

                    Thanks Ed

                    Comment


                      #11
                      Re: Filter an Excel export operation

                      Ed,

                      When I tried the export I got a message that 225 records would be exported. Emptying the rollno field in some of the records caused this number to change. So the filter was working. However continuing with the export no records were exported. ??? Since we are working with a set I took a wild guess and used
                      Code:
                      flattenquery(Job_Number=Var->askC_JOB_NUMBER .AND. ISNOTBLANK("Disch_Paper_Osd->Rollno"))
                      And it worked. Hopefully it does on your end as well.
                      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


                        #12
                        Re: Filter an Excel export operation

                        Hi Tim,

                        Am headed home from work, will give it a try there.

                        Thank You

                        Ed

                        Comment


                          #13
                          Re: Filter an Excel export operation

                          I wonder if ?????? it's not possible??????
                          Here you go..
                          Last edited by G Gabriel; 05-11-2007, 05:17 AM.

                          Comment


                            #14
                            Re: Filter an Excel export operation

                            Hello Again,

                            No success at all Tim, with flattenquery(the genie likes it), I also tried crosslevel(the genie did not like it). Also tried a5_combine_filters(), no success.

                            I can use multipul filters on the parent table in one expression and they all work correctly. IE isnotblank() or isblank() on the parent, or other filters and they work.

                            The genie will accept different filters on the child table, but when the operation is run they all choke.

                            Could this be a problem in Alpha?

                            Thanks

                            Ed

                            Comment


                              #15
                              Re: Filter an Excel export operation

                              Originally posted by Ed Barley View Post
                              Could this be a problem in Alpha?

                              Thanks

                              Ed
                              Hi Ed, It might be. I must apologise. My earlier suggestion was formulated while in v6. Without the flattenquery() it did not work and with it did.

                              Just tried here at work with v7 latest patch and get the error
                              Error
                              Error running Export Operation
                              Not an open index
                              EDIT /1

                              The index error gave me a hint. There have been a number of threads lately that seem to have a similar problem with index and filters.

                              I changed the 'Order expression' from recno() to the field Gatepass and it worked in v7. Also tried the Disch_Paper_Osd->Rollno field as an order expression and it worked as well.

                              EDIT /2

                              If you really want to do the export using recno() as the order I tried str(recno()) with success.
                              Last edited by Tim Kiebert; 10-20-2006, 01:41 AM. Reason: results of more testing
                              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

                              Working...
                              X