>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 >*-----------------------------------------------------------------------------*