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

## Bookmarks