Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need miracle!
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00701415
Message ID:
00701472
Views:
19
Hi Peter,

Thanks for the repy!

Here's a snippet of the code that is currently running (written by the previous coder about 10 years ago. No report writer, etc.)

The macro substituted vars "&mp10" are where he tells the printer what CPI to use.

When I try to print this report out using VFP7 running under Windows98 the escape codes are ignored or worse.

I'm looking for a miracle fix or any help I can get short of that. :)

Hugh
* PRINT ACTIVE PATIENTS WITH CURRENT SERUM > 2 MONTHS OLD (scmenu,kimenu)
procedure curr
@ 23, 1 say 'Processing data' color r*/w
select last, first, lastserum, dob, rabo, wl_date, dc_no from patients ;
where pregraft = 'Y' and study_gp1 = 'K' and ((mdate-lastserum) > 62 or lastserum = {  /  /  }) ;
into dbf sctemp3 order by last, first
use
use sctemp3 in 14
select sctemp3
if reccount() > 0
   do prtcmd
   tl = 0
   tc = 5
   @ tl, tc say &mp10
   @ tl, tc say date()
   @ tl, tc say padc('ACTIVE PATIENTS: CURRENT SERUM > 2 MONTHS OLD',71)
   @ tl, tc say padc('_____________________________________________',71)
   @ tl+1, tc say &mp16
   @ tl+1, tc say padc('STANFORD HISTOCOMPATIBILITY LABORATORY',121)
   @ tl+2, tc say padc('STANFORD MEDICAL SCHOOL BLOOD CENTER',121)
   @ tl+3, tc say &mp10
   @ tl+3,tc+2 say 'DATE: ' + dtoc(mdate)
   @ tl+4, tc say '                                                    DATE       CURRENT'
   @ tl+5, tc say 'NAME                              DOB      ABO     LISTED       SERUM'
   @ tl+6, tc say replicate('=',71)
   tl = 7
   go top
   scan
      mdc_no = dc_no
      select padialys
      seek mdc_no
      if found()
         if c_h = 'C'
            mdialys = dialysis
         else
            mdialys = 'HOME'
         endif
      else
         mdialys = ' '
      endif
      select sctemp3
      mrname = alltrim(last) + ', ' + alltrim(first)
      @ tl, tc say substr(mrname,1,30)
      @ tl, tc+32 say dob
      @ tl, tc+44 say rabo
      @ tl, tc+49 say wl_date
      @ tl, tc+61 say lastserum
      @ tl+1, tc+32 say mdialys
      tl = tl+2
   endscan
   @ tl, tc say replicate('=',71)
   @ tl+1, tc say 'NO. PATIENTS = ' + str(reccount(),2)
   do setscrn
endif
return
>Hugh,
>
>I assume you have the normal PRG using @ x,y SAY ...
>
>If that's so, stop worrying, because it just can be done. I don't say it's the most OOP way (Ed's classes come more near to that I guess), but once you know the proper sequences (???, SET PRINTER ..., SET DEVICE ...) all just runs without adjustment. One thing obviously, you will be using the Esc commands for driving the printers. So, your users may not like that, but obviously you can provide them with adjusting "your" control sequences. They only need the printer manual then, which to my findings, nobody has anymore.
>
>If my assumptions are right, better not start with digging into this, because your black/white picture will show white hair soon. There is a lot to it, and in fact, it depends a litte on how structured your app is, whether you can deal with the higher level adjustments needed.
>Let me know whether the above is what you mean, and I can sort things out for you in due time.
>
>Peter
>
>
>
>>Hi all,
>>
>>I have way too many reports written in FoxPro 2.6 DOS. They weren't created using the report designer, they just spit out the data to the printer directly via the "set device to print" command.
>>
>>The real problem is the escape commands used to set the CPI, etc. When they are used the reports come out looking like gobbledy-gook.
>>
>>There must be a way to run these reports under VFP7 without having to convert each and every one of them.
>>
>>Can anyone point me to more information or possibly a solution to this problem?
>>
>>Thanks in advance!
>>
>>Hugh
Microsoft hears loudest what the VFP community says about Visual FoxPro by looking at the bottom line!

Support the product. Buy the latest version!

Hugh Winters @ WorldData 408-512-1131
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform