Dave,
First, make a copy of your report (both files, .FRX and .FRT) before you open it as a table.
Second, study your table thoroughly (say, make a note that ObjType for report variables should be 18, the variables' names are stored in the memo field Name, and the expressions are stored in the memo field Expr, etc.).
Third, make sure you know what to do so the results of your changes would be valid (in size, style, etc.)
I once had a somewhat similar task. I had several columns (not only detail, but also group footers, many rows of summary, etc.) that contained a year-to-year change, some in absolute numbers, and some percentage-wise. The request I got was, in addition to showing the negative sign where the numbers went down (which, as you understand, was showing automatically), to show also the positive sign where the numbers went up.
For that, I had to change formats and expressions of the appropriate columns. It didn't help that the columns in question didn't have any particular expression to search for, but it did help that I knew for sure where they were located. So I opened the report as a table and studied it thoroughly to understand what fields exactly I needed to change and in what way. The result of this was the following little program:
Code:
rptName=[C:\myPath\myReport.frx]
nColumns=4
DIMENSION arColumn(nColumns), arFormat(nColumns)
arColumn(1)=33854.167
arColumn(2)=42187.500
arColumn(3)=64062.500
arColumn(4)=71354.167
arFormat(1)=[999,999,999]
arFormat(2)=[9999.9]
arFormat(3)=[999,999,999]
arFormat(4)=[9999.9]
cPart1=[IIF(]
cPart2=[>0,'+','')+ALLT(TRAN(]
cPart3=[,"]
cPart4=["))]
*==========================================
USE (rptName) IN 0 EXCLUSIVE ALIAS Report
SELECT Report
FOR i=1 TO nColumns
REPLACE Picture WITH "", ;
FillChar WITH "C", ;
Offset WITH 1, ;
Expr WITH cPart1+ALLTRIM(Expr)+ ;
cPart2+ALLTRIM(Expr)+cPart3+arFormat(i)+cPart4 ;
FOR ObjType=8 AND hPos=arColumn(i) AND ('9'$Picture OR '#'$Picture) AND ;
!"TRAN"$UPPER(Expr)
&& With this, we replace the numeric expression with a character one,
&& blank out the numeric format, and set up right justification.
NEXT
I faced some problems, though.
VFP (at least, the version 6 we still use) has a limit on the length of a report expression - 254 symbols. If you change the expressions interactively, the expression dialog invoked by the report designer wouldn't let you go beyond that. But if you open the report as a table, expression fields are, in fact, memo fields, and you can put there anything you want - but you might get an error once you try to open the file as a report, not a table. So after the change, some of the expressions have gone over the limit slightly. I had to think of a way to fix it. For example, I had to create memory variable to store format expressions (like "999,999,999.99") for the TRANSFORM() function, and to use them instead.