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

how many calc fileds or error?

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

    how many calc fileds or error?

    I did look through form search.

    Thanks in advance!

    Is there a limit to the number of calc fields or the total size?

    I am enclosing the calc fields for a report. The report works fine, but I cannot go into calc fields without losing some of the fields therein. cleft total, cfinance, cstatetax and a couple others.

    addressline = (if(isblank("Pobox")," "," (P.O.Box "+Pobox+")"))+ trim(Stnumb)+" "+trim(Address)+" "+trim(City)+" "+trim(County)+" "+trim(state)+" "+left(Zip,5)
    auto1 = "Stock# "+trim(Inv->Stock)+" "+ trim(Inv->Year)+" "+trim(Inv->Make)+" "+trim(Inv->Model)+(chr(13)+chr(10))+" "+trim(Inv->Trim)+" "+trim(Inv->Body)+" "+ TRIM(Inv->Color)+" " +trim(Inv->Cyl)+" Cyl"+(chr(13)+chr(10))+"Vin# "+trim(Inv->Vin)+" Miles: "+trim(Inv->Miles)
    autotrades1 = "Trade#"+trim(str(Trades->Tradenumb,2))+"-Stock# " +trim(Trades->Stock)+" "+ trim(Trades->Year)+" "+trim(Trades->Make)+(chr(13)+chr(10))+trim(Trades->Model)+" "+trim(Trades->Trim)+" "+trim(Trades->Body)+" "+ TRIM(Trades->Color)+(chr(13)+chr(10))+"VIN: "+trim(Trades->Vin)+" Miles "+trim(Trades->Miles)
    cadds = add1+add2+add3+add4+add5
    ctradeamount = dbsum("inv","Accttrade",acct,"tradeamount")
    ctaxable = (msrp+add1+add2+add3+add4+add5+filingfee+bat+tirebat+Electron )-(discount+calc->Ctradeamount)
    cdisctax = if(Altdisctax>=0.01,Altdisctax,dtaxget(calc->Ctaxable,Disctaxrate,DISCMAX))
    cstatetax = if(Alttax>=0.01,Alttax,if(((( msrp+add1+add2+add3+add4+add5+filingfee+bat+tirebat+Electron )-(discount+total(Trades->Tradeamount )))*(Taxrate/100)) <= 0.00, 0.00, ((( msrp+add1+add2+add3+add4+add5+filingfee+bat+tirebat+Electron )-(discount+total(Trades->Tradeamount )))*(Taxrate/100))))
    clefttotal = ((msrp+calc->Cadds+newwheels+bat+tirebat+filingfee+calc->Cstatetax+lemon+tags+Electron)-discount)+calc->Cdisctax
    ctradeliens = dbsum("inv","Accttrade",acct,"lamt")
    cfinance = (calc->Clefttotal+calc->Ctradeliens+Warranty+Wartax)-(calc->Ctradeamount+reb1+reb2+reb3+reb4+gmcardamt+deposit+cashondel)
    cpayment = pmtonapr(calc->Cfinance,Aprate,Term,Termtype,Daystofirst)
    csoldprice = msrp-discount+add1+add2+add3+add4+add5
    ctradeacv = total(Trades->Cost)
    cprofit = ((calc->Csoldprice-Inv->Tcost)+calc->Ctradeacv)-calc->Ctradeamount
    crebates = reb1+reb2+reb3+reb4
    datesold = if(isblank("Deliverdate"),date(),Deliverdate)
    DiscountLeft = msrp-discount
    mprice2 = calc->Discountleft+add1+add2+add3+Add4+add5
    diff = Calc->Mprice2-Tradetotalallow
    Discountname = if(discount=0,"","Discount")
    disctax = if(calc->Ctaxable<5000,(Disctaxrate*calc->Ctaxable)/100, if(Disctaxrate=.5, 25.00, if(Disctaxrate=1, 50.00,if(Disctaxrate=.75, 37.50,if(Disctaxrate=1.25, 62.50,0.00)))))
    tradetotalallow = total(Trades->Tradeamount)
    disctax2 = if(discretiontaxget((calc->Mprice2+bat+tirebat+filingfee)-(calc->Tradetotalallow),Disctaxrate,Discmax)<=0,0.00,discretiontaxget((calc->Mprice2+bat+tirebat+filingfee)-(calc->Tradetotalallow),Disctaxrate,Discmax))
    mstatetax = if(if(taxrate<12,(((Calc->Mprice2+bat+tirebat+filingfee+antitheft+Electron)-(calc->Tradetotalallow))*(Taxrate/100))+calc->Disctax,taxrate)<=0,0,if(taxrate<12,(((Calc->Mprice2+bat+tirebat+filingfee+antitheft+Electron)-(calc->Tradetotalallow))*(Taxrate/100))+calc->Disctax,taxrate))
    eagletotal = Calc->Mprice2+Tirebat+Filingfee+Antitheft+calc->Mstatetax+Tags+Newwheels+Bat+lemon
    gmcard = if(Gmcardamt>0.00, "GM Card OK: " + alltrim(Gmcardok)+if(.not.isblank("Gmcardcode")," Code: ","")+ alltrim(Gmcardcode) ," ")
    gmsapprove = If(Gms="T","GMS Authorization: "+trim(Gmsauthorization)+" Approval: "+Gmsapproval,"")
    inscomp = "Agent "+trim(Agent)+" Address "+trim(Agaddress)+";"+trim(Agcity)+", "+Agstate+", "+Agzip+" Phone "+Agphone+" Ins Co.: "+trim(Insco)+" Policy: "+Policy
    liento = if(Trades->Lamt>=1.0,if(isblank("Trades->Liento"),"","Lien To: "+trim(Trades->Liento))+if(isblank("Trades->Laddress"),""," Add: "+trim(Trades->Laddress)+"; "+trim(Trades->Lcity)+", "+Trades->Lst+" "+trim(Trades->Lzip))+if(isblank("Trades->Lphone"),""," Phone: "+Trades->Lphone)+if(isblank("Trades->Goodtil"),""," GoodTil: "+Trades->Goodtil)+if(isblank("Trades->Lacct"),""," Acct: "+Trades->Lacct)," ")
    mfinanced = (Calc->Eagletotal+Tradetotallien)-(calc->Tradetotalallow+Deposit+Reb1+Reb2+Reb3+Reb4+Gmcardamt+Cashondel)
    names = trim(Fname)+" "+trim(Mname)+" "+Buyer
    namesc = trim(Cfname)+" "+trim(Cmname)+" "+trim(Co_Buyer)
    neworused = if(Inv->Noru="N","New",if(Inv->Noru="U","Used",if(Inv->Noru="D","Demo","Prev Lease")))
    newwheels = if(Newwheels<=0.00,"======",str(Newwheels,8,2))
    revadd = if(reverse="N",Calc->Addressline,trim(Cstnumber)+" "+trim(Caddress)+" "+trim(Ccity)+" "+Cstate+" "+Czip)
    revdlbot = if(reverse="N",Cdl,dl)
    revdltop = if(reverse="N",Dl,Cdl)
    revdobbot = if(reverse="N",Co_Birth,Birth)
    revdobtop = if(reverse="N",Birth,Co_Birth)
    revhphonetop = if(reverse="N",Hphone,Co_Hphone)
    revnamesbot = if(reverse="N",Calc->Namesc,Calc->Names)
    revnametop = if(reverse="N",Calc->Names,Calc->Namesc)
    revssbot = if(reverse="N",Cssn,Ssn)
    revsstop = if(reverse="N",Ssn,Cssn)
    revwphonetop = if(reverse="N",Wk_Phone,Cwphone)
    salesman = trim(Var->Usernow)+" "+ if(.not. isblank("Splitwith"),"/ ","") + Splitwith
    tax = calc->Cstatetax+calc->Cdisctax
    tradetotallien = total(Trades->Lamt)
    tradeinfo = "Total Liens: "+trim(str(calc->Tradetotallien,10,2))+" Total Allowance: "+trim(str(calc->Tradetotalallow,10,2))
    tradeleft = Trades->Tradeamount-Trades->Lamt
    tradetotalcost = total(Trades->Cost)

    Hope someone has the patience to look through this.

    Dave Mason
    Dave Mason
    [email protected]
    Skype is dave.mason46

    #2
    Re: how many calc fileds or error?

    Dave:
    There is a limit on the number of calc fields per table: 512 fields and the length of an expression: 1024 characters.

    I am not sure how do you loose expressions when you save the window? How did you save it in the first place?

    It seems to me, you could combine several of these expressions into one, for example:

    revdlbot = if(reverse="N",Cdl,dl)
    revdltop = if(reverse="N",Dl,Cdl)
    revdobbot = if(reverse="N",Co_Birth,Birth)
    revdobtop = if(reverse="N",Birth,Co_Birth)
    revhphonetop = if(reverse="N",Hphone,Co_Hphone)
    revnamesbot = if(reverse="N",Calc->Namesc,Calc->Names)
    revnametop = if(reverse="N",Calc->Names,Calc->Namesc)
    revssbot = if(reverse="N",Cssn,Ssn)
    revsstop = if(reverse="N",Ssn,Cssn)

    All of these calc fields are based on one condition being true. I can't make any meaningful comments though not knowing your rationale for that .

    Comment


      #3
      Re: how many calc fileds or error?

      The calc fields you chose are each a different field on the report. This is actually a buyers order that with the reverse set to yes, swaps the buyer and cobuyers information and they don't seem to be the problem. I am pretty sure I don't have anywhere near the number or the size you stated.

      The fields come up missing if I just open the calc field editor and close it, which (I think) would indicate a missing calc field or a badly written one. I haven't been able to figure out what it is. Saving the report has no effect unless I have to open the calc fields editor.

      I can modify a calc field by right clicking on a calc->field and editing from there.

      Dave
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #4
        Re: how many calc fileds or error?

        Dave

        Might you try using a conditional object instead of all of those calc fields?
        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: how many calc fileds or error?

          conditional object? Explain please?

          I am using a field "Reverse" as my condition to reverse names. That seems to be working fine and the calcs with reverse in them don't disappear.

          The math fields do disappear. Not all of them, just a few. I would have no idea what a conditional object would have to do with pretty straight math.

          Dave
          Dave Mason
          [email protected]
          Skype is dave.mason46

          Comment


            #6
            Re: how many calc fileds or error?

            I could put the whole thing in a script, which I probably will have to do if the problem is not somehow rectified. I will completely rewrite the report before I will give up the extra time on print that I believe the script will cause me.

            This is a very complicated one page report. When the button is pressed, it prints 1 page with all the math complete and correct as it works right now. If I have to modify calc fields, I lose some of them.

            Dave
            Dave Mason
            [email protected]
            Skype is dave.mason46

            Comment


              #7
              Re: how many calc fileds or error?

              Dave:
              If there is a calc field in an object, in your case the report, and if there is no definition for that calc field, alpha will cause a window to pop up and tells you that this field is not attached to anything at which point you HAVE to either attach it to some field or delete it.
              Is that what you are experiencing?
              Have you tried to copy the entire "xy" window to Word, do your modifications then copy it back to the "xy" window and save?

              Comment


                #8
                Re: how many calc fileds or error?

                Originally posted by DaveM View Post
                conditional object? Explain please?

                http://support.alphasoftware.com/alp...Example_V6.htm

                http://support.alphasoftware.com/alp..._Object_V5.htm
                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


                  #9
                  Re: how many calc fileds or error?

                  I can go through all the fields on the report checking and nothing shows as a non existent field until I open and reclose the calc fields. I then get missing fields because it deletes certain calc fields as listed above.

                  I don't need conditional objects on this report because everything on the report is supposed to print.

                  All the actual calc fields are stored in word, but I would never copy back to alpha. I remember something back there that said it was a bad idea.

                  Dave
                  Last edited by DaveM; 02-26-2007, 10:23 AM. Reason: moree info
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #10
                    Re: how many calc fileds or error?

                    The following fields are the ones missing:

                    cdisctax
                    cfinance
                    clefttotal
                    cpayment
                    cdisctax
                    cdisctax2
                    tax

                    I believe now that one calc is making the others invalid and alpha is rejecting it. It actually works, so it boggles my mind.

                    Dave
                    Dave Mason
                    [email protected]
                    Skype is dave.mason46

                    Comment


                      #11
                      Re: how many calc fileds or error?

                      Originally posted by DaveM View Post
                      I can go through all the fields on the report checking and nothing shows as a non existent field until I open and reclose the calc fields. I then get missing fields because it deletes certain calc fields as listed above.
                      Have you tried the latest beta patch?
                      http://downloads.alphasoftware.com/a...chdownload.htm
                      Originally posted by DaveM View Post
                      I don't need conditional objects on this report because everything on the report is supposed to print.
                      OK, but if the reverse field = "N" you want the report to look one way, and if it's not then it has another look. Why have all of those calculated fields when you can do it one conditional obejct that has 2 layers?

                      Originally posted by DaveM View Post
                      All the actual calc fields are stored in word, but I would never copy back to alpha. I remember something back there that said it was a bad idea.

                      Dave
                      I don't understand what you are saying in this statement. Please expand....
                      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


                        #12
                        Re: how many calc fileds or error?

                        Originally posted by DaveM View Post
                        The following fields are the ones missing:

                        cdisctax
                        cfinance
                        clefttotal
                        cpayment
                        cdisctax
                        cdisctax2
                        tax

                        I believe now that one calc is making the others invalid and alpha is rejecting it. It actually works, so it boggles my mind.

                        Dave
                        Your cpayment calculated field apparently relies on a udf

                        pmtonapr(calc->Cfinance,Aprate,Term,Termtype,Daystofirst)

                        Is it possible the issue lies there? Possible that some values passed to the funciton are causing it to fail? Actually it seems that you have several udfs involved. I would suggest validating them.
                        There can be only one.

                        Comment


                          #13
                          Re: how many calc fileds or error?

                          Thanks for all the help! I am sure I am driving you crazy by now. I cannot add a calc field because so many go away. It all started when there was a need to add a field to the main table and it had to be in the calcs for several fields. field is electron n 10.2 that gets a taxable fee into it. everything worked fine on the associated form that has similar calculations for numbers and then a bunch more.

                          I am on the latest patch for V7 and this database was never opened in V8.

                          It does not lie in the payment function. In fact I deleted that calc field which was not used in this particular report to no avail. The other udf is dtaxget which works properly and is a very simple one.

                          I think Alphahas a problem with something in there, I just cannot figure it out. I wish it would not delete what it is not sure of.

                          I am not concerned about the reverse. It works and has done so for 3 years. It is also used in other reports with 0 problems. In fact the credit app report has 28 of those fields.

                          I went so far as to re-creat the clefttotal with other data(modified to have no calc fieds included and it got wiped out.

                          Amazing!

                          dave
                          Dave Mason
                          [email protected]
                          Skype is dave.mason46

                          Comment


                            #14
                            Re: how many calc fileds or error?

                            Dave,

                            If this were happening to me, I'd discard half of the calc fields and revise the layout accordingly. If the report runs fine I'd conclude the problem is not within the first half of the calc fields.

                            I'd then add back half of the remaining half, revise the layout, and test again. If it runs ok I'd conclude the first 3/4 of the calc fields are ok.

                            I'd then add back half of the remaining quarter... and repeat the sequence.

                            Continue til the error is found.

                            This will help you find the errant calc field in the fewest tests.

                            ------------------------------

                            I'd bounds test each term in each expression to make certain Alpha can return a value when the term is zero and when the term is known.

                            These calc fields must be computed as each record is fetched in the report. They get run everytime a new record is fetched. They cannot all be run at the same time. Are there dependencies inherent in your calcs that can be thrown off if Alpha tries to evaluate an expression before all the terms are known to it? This can happen when calc expressions are nested within each other. If it were me, I'd reframe each expression that depends on another, so that the dependencies are removed. If this is impossible because of the 1024 char expression limit, then I'd think seriously about doing the calcs in a script that preprocesses all the records and dumps them to a temp table for the report printout.

                            Comment


                              #15
                              Re: how many calc fileds or error?

                              Tom,

                              Thanks for responding!

                              I am think like you in the script, but making variables that will go on the report because a lot of my calcs are fine. I could just put in the money parts for the script. I think it should run on report init for this.

                              Dave
                              Dave Mason
                              [email protected]
                              Skype is dave.mason46

                              Comment

                              Working...
                              X