Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When to Remove Contents of EXPR, TAG and TAG2
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00742756
Message ID:
00743297
Views:
28
Hi Kevin,
I really like your Report Patcher.
I am going to give it a try.
Thanks,
Terry Harris

>Thank you so much!
>Very nifty utility.
>Am I correct in saying that other settings such as # of copies are not retained?

>
>Terry went ahead and saved all of the "good" settings and then copied those back into the expr field. The other approach is to remove the "bad" settings: DEVICE, OUTPUT and DRIVER. I'll post the code below (the good thing about posting code is that if you make a mistake, someone will point it out!).
>
>
>lcReportDir=zgetDir('Get Report Folder')  && zGetDir is the api getfolder stuff -- use getdir() instead.
>If not empty(lcReportDir)
>  lcReportDir=addbs(lcReportDir)
>  lnReports=adir(laFRXfiles,lcReportDir+"*.frx")
>  For nFrxCounter= 1 to lnReports
>    wait window nowait "Report Number " + transform(nFrxCounter)
>    lcReportFile=lcReportDir+laFRXfiles(nFrxCounter,1)
>    Use (lcReportFile) in 0 alias frxReport
>    Select frxReport
>    Locate FOR objtype = 1 AND objcode = 53
>    If FOUND()
>*!*	Find out how many lines in memo field. Find mline for DEVICE, OUTPUT, DRIVER delete these lines
>	m.memolines= memlines(expr)
>	nDeviceline=atcline("DEVICE=",expr)
>	nOutputLine=atcline("OUTPUT=",expr)
>	nDriverline=atcline("DRIVER=",expr)
>	m.NewExpr=""
>	For i = 1 to m.memolines
>          If i#nDeviceline and i#nOutputLine and i#nDriverline
> 	    m.NewExpr=m.NewExpr + mline(expr,i) +chr(013)
> 	  Endif
>	Endfor   && m.memlines
>	Replace expr with m.NewExpr
>	Replace tag WITH ""
>	Replace tag2 WITH ""
>	Endif   (Found())
>     Use in frxReport
>
>   Endfor (nFrxCounter)
>
>Endif  (not empty(lcReportFile)
>wait clear
>wait window "Resetting Report default printer options completed"
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform