Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the Windows default printer
Message
 
À
17/01/2002 11:59:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00606147
Message ID:
00606358
Vues:
20
Steve,
Thanks for the sugestion and the sample. I've out your change in, but it's still trying to go to the windows default printer...the laser printer instead of the PDF driver.

Rick

>Richard,
>
>Perhaps you need to remove printer information from the report. The code below does that.
>
>>The program recognizes that the "DocuCom PDF Driver" is there and the VFP printer is set to it but when I print my printout still goes to the HP which is set as my Windows default printer. I need to go to the "DocuCom PDF Driver" to create my PDF....but that's not happening.
>>
>
>
>function clearReportTags
>lparameters lcReportName
>*******************************************************************************
>*
>*      Purpose: Removes printer specific information from VFP report file
>*
>*   Parameters: name of report
>*
>*        Notes: makes a backup copy of .frx file, with a .frx.bak extension
>*                   The only thing left in expr field is the orientation
>*                   line.  Modify this if this is not satisfactory
>*-----------------------------------------------------------------------------*
>	local 	lcCurrentAlias, ;
>			lcExpr, ;
>			lcOldSafety
>
>
>	lcCurrentAlias = alias()
>
>	if empty(justExt(lcReportName))
>		lcReportName = lcReportName + ".frx"
>	else
>		if upper(justExt(lcReportName)) # "FRX" && invalid report filename
>			error lcReportName + " is an invalid report filename"
>			return .f.
>		endif
>	endif
>
>
>	lcOldSafety = set("safety")
>	set safety off
>	copy file (lcReportName) to (lcReportName + ".bak")
>	set safety &lcOldSafety
>
>	use (lcReportName) alias lReport in 0 exclusive
>
>	select lReport
>	goto top
>
>	replace tag with ''
>	replace tag2 with ''
>	lcExpr = expr
>	if (at("ORIENTATION",lcExpr) # 0)
>		replace expr with SUBSTR(lcExpr,AT("ORIENTATION",lcExpr),13)
>	endif
>
>	pack
>	use in lReport
>
>	if !empty(lcCurrentAlias)
>		select (lcCurrentAlias)
>	endif
>
>endproc
>*-----------------------------------------------------------------------------*
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform