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



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

Update to Alpha 10

  • Filter
  • Time
  • Show
Clear All
new posts

  • Update to Alpha 10


    I am thinking to upgrade to Alpha v10, but after testing I found a issue:

    I have a variable that is a Char: var_c
    When comparing with a string of numbers, I get a error.

    if var_c >= "123 321"

    How do I process strings with operators >=< in Alpha 10?

  • #2
    Re: Update to Alpha 10

    Not sure what your question is

    dim var_c as C
    var_c = "12345"
    ? var_c = 12345
    ERROR: Argument is incorrect data type
    ? val(var_c) = 12345
    = .T.
    ? val(var_C) >= 12345
    = .T.
    I don't think this has behaved differently in any version of Alpha.

    123 321 is not a number. It is a string of digits separated by a space. There are no spaces in numbers.

    tst = "123 321"
    ? val(tst)
    = 123
    Last edited by Stan Mathews; 01-19-2010, 02:31 PM.
    There can be only one.


    • #3
      Re: Update to Alpha 10

      Try something like this to examine the behavior:

      dim string as c
      string = "123 321"
      if string="123 321" then
      msgbox("Match", "c is " + string)
      msgbox("Mismatch", "c is " + string)
      end if

      You can do this in an interactive window and get a feel for it. Then you will be ready to use it in your code.



      • #4
        Re: Update to Alpha 10

        Guessing. He probably means that it's strange that "2" is greater than "10".

        To compare strings of numbers, you need pad them with spaces on the left so that they are the same length.


        • #5
          Re: Update to Alpha 10

          I share Stan's confusion about what Tiago means to be asking.

          Character strings can be compared (for equality) with character strings.

          Numerics can be compared with numerics for equality or for relative position on the number line: greater than, less than.

          You can't compare character strings with numerics.

          Greater than and less than comparisons of character strings make no sense, they don't live on the number line.

          Not a vers 10 issue.

          I'd be interested in seeing code that performs one way in vers 9, but differently in vers 10. Maybe Tiago will return and enlighten us.

          -- tom


          • #6
            Re: Update to Alpha 10

            Thanks for your comments.

            But why this doesn't work for alpha 10 and works well for alpha 9?

            I can change to val(trim(Nom_Acc_No))>=val(trim("4105 100")), but didn't test yet in alpha 10.
            Does this change works for alpha 10?

            MC_Year_Text = "Year"
            MC_Header = "Profit & Loss"
            Overheads_Text = IF(Nom_Acc_No>="4105 100".AND.Nom_Acc_No<="4900 999","Overheads","   ")
            Expenses_Text = IF(Nom_Acc_No>="3600 100".AND.Nom_Acc_No<="3600 999","Expenses","   ")
            Income_Text = IF(Nom_Acc_No>="3200 100".AND.Nom_Acc_No<="3399 999","Income","   ")
            Income = Nom_Acc_No>="3200 100".AND.Nom_Acc_No<="3399 100"
            MC_Proffit = Total_Total_Cr_Amt-Total_Total_Dr_Amt
            MC_Text_Ploss = IF(calc->Mc_Proffit<0,"Profit:","Loss:")
            MC_Incone = IF(Nom_Acc_No>="3200 100".AND.Nom_Acc_No<="3399 999",Total_Total_Cr_Amt-Total_Total_Dr_Amt,0)
            MC_Overheads = IF(Nom_Acc_No>="4105 100".AND.Nom_Acc_No<="4900 999",Total_Total_Dr_Amt-Total_Total_Cr_Amt,0)
            MC_Expenese = IF(Nom_Acc_No>="3600 100".AND.Nom_Acc_No<="3600 999",Total_Total_Dr_Amt-Total_Total_Cr_Amt,0)
            Tot_Proffit = total(calc->MC_Proffit,grp->Grand,grp->detail)
            Tot_Income = run_total(calc->MC_Incone,grp->Income,grp->detail)
            Tot_Expenses = run_total(calc->MC_Expenese,grp->Income,grp->detail)
            Tot_Overheads = run_total(calc->MC_Overheads,grp->Income,grp->detail)
            MC_Tot_Exp = calc->Mc_Expenese+calc->Mc_Overheads
            tot_calc_MC_Tot_Exp_for_Grand = total(calc->MC_Tot_Exp,grp->Grand,grp->detail)
            MC_Percent = calc->Tot_Proffit/calc->Tot_Calc_Mc_Tot_Exp_For_Grand*100


            • #7
              Re: Update to Alpha 10

              Seems to be working for me in v10

              dim nom_acc_no as C="2601 100"
              ? IF(Nom_Acc_No>="3600 100","yes","no")
              = "no"
              dim nom_acc_no as C="4601 100"
              ? IF(Nom_Acc_No>="3600 100","yes","no")
              = "yes"
              dim nom_acc_no as C="3601 101"
              ? IF(Nom_Acc_No>="3600 100","yes","no")
              = "yes"
              dim nom_acc_no as C="3600 001"
              ? IF(Nom_Acc_No>="3600 100","yes","no")
              = "no"
              dim nom_acc_no as C="3601 001"
              ? IF(remspecial(Nom_Acc_No)>=remspecial("3600 100"),"yes","no")
              = "yes"
              dim nom_acc_no as C="3600 001"
              ? IF(remspecial(Nom_Acc_No)>=remspecial("3600 100"),"yes","no")
              = "no"
              Mike W
              "I rebel in at least small things to express to the world that I have not completely surrendered"


              • #8
                Re: Update to Alpha 10

                You have confused us.

                I have a variable that is a Char: var_c
                [COLOR="Red"][B]When comparing with a string of numbers[/B][/COLOR], I get a error.
                if var_c >= "123 321"
                NO. You have a string of digits.

                Your calculated fields should work ok. Testing with a sample value for Nom_acct_no...

                Nom_Acc_No = "4505 245"
                Overheads_Text = IF(Nom_Acc_No>="4105 100".AND.Nom_Acc_No<="4900 999","Overheads","   ")
                ? Overheads_Text
                = "Overheads"
                Which calculated field is giving you an error?

                These three calculated fields seem to refer to other calculated fields that are not defined...

                MC_Incone = IF(Nom_Acc_No>="3200 100".AND.Nom_Acc_No<="3399 999",[COLOR="Blue"]Total_Total_Cr_Amt[/COLOR]-[COLOR="blue"]Total_Total_Dr_Amt[/COLOR],0)
                MC_Overheads = IF(Nom_Acc_No>="4105 100".AND.Nom_Acc_No<="4900 999",[COLOR="blue"]Total_Total_Dr_Amt[/COLOR]-[COLOR="blue"]Total_Total_Cr_Amt[/COLOR],0)
                MC_Expenese = IF(Nom_Acc_No>="3600 100".AND.Nom_Acc_No<="3600 999",[COLOR="blue"]Total_Total_Dr_Amt[/COLOR]-[COLOR="blue"]Total_Total_Cr_Amt[/COLOR],0)
                There can be only one.


                • #9
                  Re: Update to Alpha 10

                  What is the value of 'Nom_Acc_No' when it doesn't work?

                  What does 'not work' mean? What happens instead of what you expect to happen?
                  Last edited by aRob; 01-27-2010, 12:42 PM. Reason: More


                  • #10
                    Re: Update to Alpha 10

                    The results is a empty report.

                    We are grouping information based in this expression.

                    And we can not see the value of this variable in the report environment.

                    Any ideas?


                    • #11
                      Re: Update to Alpha 10

                      And we can not see the value of this variable in the report environment.
                      Where is this variable defined and what is its scope.
                      There can be only one.


                      • #12
                        Re: Update to Alpha 10

                        Nom_Acc_No is just a table field.


                        • #13
                          Re: Update to Alpha 10

                          Tiago, your posts seem designed to provide the least information possible. Maybe you enjoy playing the child's game "twenty questions" ? If so, here are some more questions:

                          a) what's your grouping expression?

                          b) what's the report filter expression?

                          c) define the terms used in both expressions, telling us where they get their values and whether they're variables or table fields

                          d) is the report based on a table or a set of tables? If the latter, describe the set so we can see how the filter and grouping expressions would be applied by Alpha Five.

                          e) what "variable" is it that you "cannot see in the report environment"?

                          f) why do you think you should be able to see it?

                          Please frame your answers assuming you are talking to blind men who know nothing about your database, its tables, or your report.


                          • #14
                            Re: Update to Alpha 10

                            Does the rest of your database work correctly in V10?

                            What is the length of 'Nom_Acc_No' as defined in the table? Is it 8 characters long like the account numbers that you are comparing it to? I would guess that it is too short or too long and therefore is not being trapped by any of the IF statements.
                            Are there leading zeros or spaces in 'Nom_Acc_No'? Can you post some sample 'Nom_Acc_No' from your table?

                            Of course, it may have nothing to do with 'Nom_Acc_No'. Something may have changed in the report system between V9 and V10. That's difficult to diagnose without seeing the tables and the report.


                            • #15
                              Re: Update to Alpha 10

                              I am sorry for the later response but it take a long time to prepare a demo with the problem.

                              We have a table (nl_years_result), a report (NL_Proffit_Loss) and a Code (Profit_Loss_Year).

                              Please try to run the code: Profit_Loss_Year.

                              It work well in alpha 9 but doesn't in alpha 10.
                              I didn't detect any problems in report or code, so don't undestand why this doesn't work in alpha 10.

                              Can you explain me why this happen?

                              My only explanation is: it is a bug.