Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert blank page if page group finishes on the odd page
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00444634
Message ID:
00457436
Views:
29
>Nadya,
>
>Would you email me the report and test file to create this situation. I'm trying to recreate it and I'm not having any luck.
>
>Thanks,
>Cathy

Hi Cathy,

BTW, I've discovered quite recently, that ASCII option in Report FORM doesn't work correctly, if there are multiple items in either of bands. I know MS KB article about bug here, but the cure suggested doesn't help. I played with different _asciirows and _asciicols settings and nothing helped. Finally I converted Report into program and now it works fine. Therefore for reports, which need to be produced as ASCII plain text (no formatting), I would recommend do it programmatically or I was told to create a Report for DOS. I also wrote a simple conversion program, which may ease the process of converting. (still, of course, the program then needs to be modified manually).
Here is the program:
*******************************************************************************************
*  Description.......: ReportToAscii - this program uses ReportFile as Input Table 
*                      and results a program to produce the same Output (as Report should produce)
*  Calling Samples...: ReportToAscii("Galley","g:\redp\appl\Special\Progs\GalleyRpt.prg")
*  Parameter List....: tcReportFile, tcProgramFile
*  Created by........: Nadya Nosonovsky 12/22/2000 10:09:26 AM 
*  Modified by.......: 
********************************************************************************************
lparameters tcReportFile, tcProgramFile
local lcReportName, lcProgramName, lnAnswer
if empty(tcReportFile) or vartype(tcReportFile)<>'C'
    lcReportName='Galley.frx'
else
    lcReportName=forceext(tcReportFile,"frx")
endif        
if !file(lcReportName) && Report file doesn't exist
    =messagebox("File "+lcReportName+" is not found!",48,"Error")
    return .f.
endif
if empty(tcProgramFile) or vartype(tcProgramFile)<>'C'
    lcProgramName='Galley.prg'
else
    lcProgramName=forceext(tcProgramFile,"prg")
endif        
if file(lcProgramName)
   lnAnswer=messagebox("File "+lcProgramName+ " already exists. Do you want to re-create it?",36,"File exists")
   if lnAnswer=7 && No
      return .f.
   else
      erase (lcProgramName)   
   endif
endif      
local lcStr, lcHeader, lcBegin, lcEnd
select expr, supexpr, vpos, hpos from (lcReportName) ;
into cursor curReport where inlist(objtype,5,8) order by 3,4 
#define LCRF chr(10)
lcStr=''
lcHeader="#define LCRF chr(10)"+LCRF+"local lcStr"+LCRF+"* Open table here, then scan ... endscan ..."+LCRF
lcBegin="lcStr=lcStr+"
lcEnd="+LCRF"
scan 
  if not empty(supexpr)
     lcStr=LcStr+"if "+alltrim(supexpr)+LCRF+ ;
     space(6)+lcBegin+alltrim(expr)+lcEnd+LCRF+"endif"+LCRF
  else
     lcStr=LcStr+lcBegin+alltrim(expr)+lcEnd+LCRF
  endif
endscan
*=messagebox(lcStr)
=strtofile(lcHeader+lcStr,lcProgramName)
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