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:
00701543
Views:
24
Hugh,

I can't promise at a 100 %, but I can tell you, have a nice sleep tonight.
I really don't see any problems in your code.

Like you said in the other message : "CPI even changes in the middle of a line", no problem, again. It's just a matter of the right attachment to the printer (which I don't know by heart and I can't reach that now), plus some minor additional things (like an EJECT is not allowed anymore or so).

We have our own (enduser) report writer, and the first thing they are (obviously) allowed to, is changing fonts, cpi, lineheight, landscape, duplex, name it. In the end, just like your code example, all is controlled by &ControlCode variables.

If you are just willing to forget about proportional fonts (unlike on forms) there is really nothing wrong with having your reports as in the old days.
But maybe that is just my opinion.

Cheers (and dream about miracles),
Peter


>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
Previous
Reply
Map
View

Click here to load this message in the networking platform