Focal Point
Manipulate Row Total with Across?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2981097331

August 28, 2004, 03:26 PM
<Jonathan Sutter>
Manipulate Row Total with Across?
I am working on a report that uses an ACROSS field to produce columns of case counts by each ACROSS value. (The report also uses a number of BY fields but I don't believe these play into my problem.) I need the final column on the right to act like a row total except that there are two columns that need to be excluded from that total.

I have tried the ACROSS-TOTAL with COLUMNS, but this results in those two columns not being included in the report.

I created a DEFINE field that, when summed, would produce the correct total, but I don't want it to appear with each column in the report.

I've tried a multi-verb request to use that DEFINE field separately, but this apparently won't work when you use an ACROSS.

I made a version of the report that created DEFINE fields for each possible value for the field I used in the ACROSS in the other attempts. This worked, but it slows down the report considerably and causes other problems with other features that really need the thing to work with an ACROSS field.

Is there some way to modify a row total in an expression?
Is there a way to make a multiverb request work with ACROSS sorts?
Any ideas??
August 29, 2004, 10:39 PM
TexasStingray
Jonathan Sutter

If you always have the same # of fields and across' in the report. You might try holding the data with the across in it. This will create new fields for each field in the across. After you hold the report issue a
quote:
? HOLD HOLDFILENAME
Replace HOLDFILENAME with the name of your hold file. This will give you a list of fields in the hold file. Then you can print the fields and compute a your own row total field and print it. Give this a try and post your results. Smiler Good Luck Smiler
August 30, 2004, 05:06 AM
Piipster
You can try a technique COMPUTEing a field AFTER the sort statements and using column-notation.

Here's an example:

TABLE FILE EMPDATA
SUM SALARY

BY DEPT
ACROSS DIV

COMPUTE
EAST_TOTAL/D12.2MS = C3 +C4;
AS 'Total - East'
COMPUTE
OTH_TOTAL/D12.2MS = C1 + C2 + C5;
AS 'Total - Other'
END

Just be aware that if you change the field format of the verb objects, on the fly, you end up with 2 internal columns so your column notation has to take into account 2 occurrences of every column.

If that doesn't make sense, let me know and I'll explain.
August 30, 2004, 09:34 AM
<steegh>
There is a simple way to solve this problem, with one disadvantage.
You can use u multi verb request as follows:

SUM DEFINE_FIELD
BY SORT1
BY SORT2
SUM OTHER_FIELD
BY SORT1
BY SORT2
ACROSS ACROSS_FIELD
END
The only problem is that the total field will be in front of the across fields.

GR.

Robert
September 23, 2004, 12:47 PM
<Jonathan Sutter>
Thanks to all three of you for your suggestions. The multiverb approach won't work for me due to specific layout needs. I tried the COMPUTE after the ACROSS and it didn't recognize the COMPUTE. I haven't tried the HOLD idea yet. Alas, due to an imminent change in duty stations, I will no longer be developing reports with WebFocus so I cannot pursue this one further.