Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert ASCII in Report (output to File ASCII)
Message
 
 
To
21/12/2000 16:05:43
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00455698
Message ID:
00456086
Views:
33
>Nadya:
>
>> Which Proportional font should I use? Currently it's Curier New.
>
>That's exactly the (non-proportional) font I would use. I would also put the report expression at Top = -1 in the detail band (this seems to eliminate the blank lines between records).
>
>You also mentionned you are using Chr(9) in an earlier post. I would be careful using Tabs because they can be interpreted diffently from application to application (especially if the application allows you to customize keys). For example, type Edit MyFile.txt at a DOS prompt, choose the Settings... command from the Options menu to customize the Tab Stops. Flexibilty sometimes come at a price..
>
>One (silly but it has worked for me) way to develop those report is to have one calculated field per band to hold everything. For example, the fioeld can contain the name of a city, its state, its number of habitants, its median income, etc. You will probably have to do the formatting calculations in a function or in your table but it works (painfully).
>
>Daniel

Daniel,

Thanks a lot for your response. Yes, I thought about it, but it would be tough. So I choose another way (which I've just implemented - create a program, which would produce desired output). For this purpose firstly I hacked frx, then do something. These are my 2 little programs:
********************************************************************
*  Description.......: GalleyRpt - Special program to produce Galley Report
*  Calling Samples...: GalleyRpt(oJC.outTable)
*  Parameter List....: tcTableName
*  Created by........: Nadya Nosonovsky 12/21/2000 03:18:59 PM
*  Modified by.......:
********************************************************************
lparameter tcTableName
#define CLRF chr(10)
if empty(tcTableName)
     tcTableName="\Redp\Output\Galley\GalleyMA0008Tstr" && For tests only
endif
local lcStr, lcDBFName, lcFileName, lnOldSelect, lcRegistry, lcTown, llFirstTime, lcRecGrp
lnOldSelect=select()
lcDBFName=forceext(tcTableName,"dbf")
lcFileName=forceext(tcTableName,"rer")
=OpenTable(lcDBFName,"WorkTable","shared noupdate","geo") && Assume it opens just fine
select WorkTable
go top
lcRegistry=Registry
lcTown=Town
llFirstTime=.t.
lcRecGrp=RecGrp
do while !eof()
     if lcRegistry<>Registry or llFirstTime
          lcStr=iif(vartype(oJC)='O' and oJC.CurState="CT",'@CTHD:','')+alltrim(Registry)+CLRF
          lcRegistry=Registry
     endif
     if lcTown<>Town or llFirstTime
          lcStr=lcStr+iif(vartype(oJC)='O' and oJC.CurState="CT",'@CTTOWN:',"@Records Town Head:")+alltrim(City)+CLRF
          if !empty(TClerkName)
               lcStr=lcStr+'@TC Label:Town Clerk:'+alltrim(TClerkName)+CLRF
          endif
          if !empty(TClAddress)
               lcStr=lcStr+'@Clerk Address:'+alltrim(TClAddress)+CLRF
          endif
          if !empty(TClPhone)
               lcStr=lcStr+'@Clerk Address:Phone:'+alltrim(TClPhone)+CLRF
          endif
          lcStr=lcStr+'@Mkt. Stats:Market Statistics Through '+alltrim(cEndMonth)+CLRF
          lcStr=lcStr+'@Records Mkt. Stats:'+chr(9)+chr(9)+'YTD '+cPrevYear+chr(9)+'YTD '+cCurYear+CLRF
          lcStr=lcStr+chr(9)+'Number of Sales'+chr(9)+alltrim(transform(YtdNumPrev,'@Z'))+chr(9)+alltrim(transform(YtdNumCur,'@Z'))+CLRF
          lcStr=lcStr+chr(9)+'Number of Sales'+chr(9)+alltrim(transform(YtdNumPrev,'@Z'))+chr(9)+alltrim(transform(YtdNumCur,'@Z'))+CLRF
          lcStr=lcStr+'@Records Mkt. Stats Fin:'+chr(9)+"Median Price" +chr(9)+strtran(transform(YtdMedPrev,'@Z $999,999,999')," ","")+chr(9)+strtran(transform(YtdMedCur,'@Z $999,999,999')," ","")+CLRF
          if !empty(lcBegDate) or !empty(lcEndDate) or !empty(rdBegDate) or !empty(rdEndDate)
               lcStr=lcStr+"@Filing Dates:This Week's Filing Dates"+CLRF
          endif
          if !empty(rdBegDate) or !empty(rdEndDate)
               lcStr=lcStr+'@Records Filed:Registry of Deeds:'+alltrim(rdBegDate)+'-'+alltrim(rdEndDate)+CLRF
          endif
          if !empty(lcBegDate) or !empty(lcEndDate)
               lcStr=lcStr+'@Records Filed:Land Court:'+alltrim(lcBegDate)+'-'+alltrim(lcEndDate)+CLRF
          endif
          lcTown=Town
     endif
     if lcRecGrp<>RecGrp or llFirstTime
          lcStr=lcStr+'@Records R. E. Sales:<f"EuropeanPi-Four">P<f"Helvetica">'+iif(RecGrp=1,'Real Estate Sales',iif(RecGrp=2,'Foreclosure Deeds','Mortgages'))+CLRF
          lcRecGrp=RecGrp
     endif
     llFirstTime=.f.
     if RecGrp<3
          lcStr=lcStr+'@Records First Line:'+alltrim(Address)+chr(9)+iif(Price>=1000,strtran(transform(Price,'$999,999,999')," ",""),'')+iif(Price=3," No Amount Given","")+CLRF
     endif
     if RecGrp=3
          lcStr=lcStr+'@Records First Line:'+alltrim(Address)+chr(9)+strtran(transform(Mortgage,'@Z $999,999,999')," ","")+iif(Mortgage=0 and !empty(LndrName)," No Amount Given","")+CLRF
     endif
     if RecGrp<3 and !empty(CondoName)
          lcStr=lcStr+'@Records Text:'+chr(9)+alltrim(CondoName)+CLRF
     endif
     if RecGrp<3 and !empty(cmboBuyer)
          lcStr=lcStr+'@Records Text:'+chr(9)+alltrim(cmboBuyer)+CLRF
     endif
     if RecGrp<3 and !empty(CmboSeller)
          lcStr=lcStr+'@Records Text:'+chr(9)+alltrim(CmboSeller)+CLRF
     endif
     if RecGrp<3 and !empty(DocCombo)
          lcStr=lcStr+chr(9)+alltrim(DocCombo)+CLRF
     endif
     if RecGrp<3 and !empty(LndrName)
          lcStr=lcStr+chr(9)+alltrim(LndrName)+" "+strtran(transform(Mortgage,"@Z $999,999,999")," ","")+iif(Mortgage=0 and !empty(LndrName)," No Amount Given","")+CLRF
     endif
     if !empty(prTerm) or !empty(prRate) or !empty(prIntType)
          lcStr=lcStr+chr(9)+alltrim(prTerm)+' '+alltrim(prRate)+' '+alltrim(prIntType)+CLRF
     endif
     if !empty(MtgAssigne)
          lcStr=lcStr+iif(!empty(MtgAssigne) and left(MtgAssigne,11)='Assn of Mtg',chr(9)+'Mtg Assn to: '+ltrim(substr(MtgAssigne,12)),'')+CLRF
     endif
     if RecGrp<3 and !empty(PropCombo)
          lcStr=lcStr+chr(9)+PropCombo+CLRF
     endif
     if RecGrp<3 and (!empty(PrSlPr) or !empty(PrDate))
          lcStr=lcStr+chr(9)+"Prior Sale: "+strtran(transform(PrSlPr,'@Z $999,999,999')," ","")+" "+PrDate+CLRF
     endif
     if RecGrp=3 and !empty(Borrowing)
          lcStr=lcStr+'@Records Text:'+chr(9)+Borrowing+LCRF
     endif
    if len(lcStr)>16770000 && Large file
       =strtofile(lcStr,lcFileName,.t.)
       lcStr=''
    endif   
     skip
enddo
=strtofile(lcStr,lcFileName,.t.)
return .t.
*select expr, supexpr, vpos, hpos from galley.frx into cursor curRepGalley where objtype=8 order by 3
#define LCRF chr(13)+chr(10)
lcStr=''
scan 
  if not empty(supexpr)
     lcStr=LcStr+"if "+alltrim(supexpr)+LCRF+alltrim(expr)+LCRF+"endif"+LCRF
  else
     lcStr=LcStr+alltrim(expr)+LCRF
  endif
endscan
=messagebox(lcStr)
strtofile(lcStr,"g:\redp\appl\Special\Progs\GalleyRpt.prg")
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform