Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stripping printer information... 1

Status
Not open for further replies.

Neil Toulouse

Programmer
Mar 18, 2002
882
GB
Hi folks!

I have an issue whereby I have 3 seperate reports emulating a single, 3 page report. In our organisation's setup we have a problem whereby the 'second page' ends up going to a printer in another building!! keeps them fit I suppose ;)

I do this by issuing the SYS(1037) command to set the printer for the session and then issuing the 3 report print commands.

Our teckies have got around the problem by only allowing one printer (driver) per client machine thus only being able to print the reports to one printer.

To get around this problem from a coding point of view I thought Ramani's code for stripping out the printer info may help but this made things worse by also removing the orientation setting and so my landscape reports were being forced to portrait!!

Basically my question is what is the benefit of stripping out the printer information, and are there specific settings that need to be kept?

TIA
Neil "I love work. I could sit and stare at it for hours..."
 
FatSlug

To get around this problem from a coding point of view I thought Ramani's code for stripping out the printer info may help but this made things worse by also removing the orientation setting and so my landscape reports were being forced to portrait!!

You can keep just the information required. I would suggest strip the info in the Expr field and just keep the "ORIENTATION" line and see if that helps.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Thanks Mike!

I assume such properties as ORIENTATION are not printer driver specific and thus can be kept, but why strip the information out in the first place? What behaviour/problems occur if the developer's printer info is left in the report?

Neil "I love work. I could sit and stare at it for hours..."
 
Hi Neil,

PROCEDURE gs_SetFrx && the stripper programme.
*****************************************************
LOCAL cRptFile, i, p
FOR p = 1 TO application.Projects.Count
FOR i = 1 TO application.Projects(p).Files.Count
cRptFile = application.Projects(p).Files(i).NAME
IF UPPER(JUSTEXT(cRptFile)) = "FRX"
WAIT WINDOW cRptFile && NOWAIT to avoid enter
USE (cRptFile)
LOCATE
myExpr = ""
** following lines added ...
** ...that you want to keep the ORIENTATION
n=ALINES(aFrx,expr)
IF n > 0
=ASCAN(aFRX,"ORIENTATION")
nLine=ASCAN(aFRX,"ORIENTATION")
IF nLine > 0
myExpr = aFRX(nLine)
ENDIF
ENDIF
** end of special codes for you
REPLACE Expr WITH myExpr, ;
Tag WITH "", Tag2 WITH ""
USE
ENDIF
ENDFOR
ENDFOR
*****************************************************
** EOF
*****************************************************
Hope this helps you. :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thanks for the code! "I love work. I could sit and stare at it for hours..."
 
Ramani -

Thank you for the code. I have been cleaning the frx files by hand for some time. I too have to preserve the "ORIENTATION" setting for some price tags and other store graphics. I am trying to follow your code and can't figure out where "aFrx" is coming from. Is there a missing line in the post?

Thanks

Steve
 
Hi Steve,

The above code is in completeness. Just open the project you want to hack the driver info.. then from command line.. run the above PRG. Make sure you save all the lines between the lines marked only in your prg.
************************
************************

Regarding specific question.. aFrx
n=ALINES(aFrx,expr)
creates the aFrx array and expr is the memo field.

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
Merry Christmas & Happy New Year [bigears] [party] [2thumbsup]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top