Focal Point
[CLOSED] dummy column

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

December 17, 2010, 10:14 AM
subbu
[CLOSED] dummy column
Hi,

I need to show a dummy column('TOTAL') before the CAR column like below.

 
 
                COUNTRY 
TOTAL    CAR    W GERMANY 
TOTAL    BMW    49,500 
TOTAL    JAUGAR  . 
TOTAL    TEST    .00 



I have used the following code

  

TABLE FILE CAR
SUM DEALER_COST
ACROSS COUNTRY
FOR CAR
'BMW' OVER
'JAUGAR' OVER
RECAP TEST/D12.2 = R1/R2;
END



can some one help me in getting the heading for CAR COLUMN as 'CAR' and the dummy column 'TOTAL' using the above table request.

Note: I have used FML and I want bring in FML code only.

Thanks!

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.10
Windows
Output: Excel,PDF
December 17, 2010, 10:22 AM
Prarie
SET BYDISPLAY=ON
DEFINE FILE CAR
DUMMY/A5 = 'TOTAL';
END
TABLE FILE CAR
SUM

DEALER_COST
ACROSS COUNTRY
BY DUMMY AS ' '
FOR CAR
'BMW' OVER
'JAUGAR' OVER
RECAP TEST/D12.2 = R1/R2;

END
December 19, 2010, 03:43 PM
Waz
When you use the FOR command, WebFOCUS does not supply a column title.

My suggestion is to hold the out out, and TABLE it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 20, 2010, 06:35 AM
<JG>
7.7.0.2 New Feature 'Column Titles for FML and BY ROWS OVER Requests'
December 20, 2010, 09:16 AM
subbu
Thanks to all for the infomation provided. Sorry! for the big message below.

I have few things want to know the way to bring this or not. Now I have a report like below

  
_________________________________________________________________________________________________
                | LEFT                          | RIGHT                                         |
 TOTAL COUNTRY  | 01-01-2010    |  01-02-2010   | 03-10-2010  |  05-10-2010   | TOTAL | TESTCOL |
=================================================================================================
 TOTAL ENGLAND  | 10           |  30            | 20          |  10           |  70    |   10%  |     
 TOTAL AFRICA   | 20           |  60            | 40          |  40           |  160   |    30% | 
 TOTAL INDIA    |  2           |  2             |  2          |   4           |  10    |   50%  |
 TOTAL JAPAN    | 30           |  40            | 50          |  11           |  16%   |    60% | 
 TOTAL RUSSIA   | 30           |  50            | 20          |  12           |  112   |    10% |
_________________________________________________________________________________________________



Its a simple by and Across report. But, the row values for "INIDA" for each date column is different. Its not sum of INDIA. It has a formula where (AFRICA/ENGLAND) will bring me the value for each date column.

The TOTAL column for the first three rows (ENGLAND,AFRICA,INDIA) is sum of all date values for each COUNTRY but for JAPAN it is (AFRICA/INDIA) * 100 (16% value) for JAPAN, TOTAL value.

The TOTAL AND TESTCOL are computed columns and the I have used FML only to achieve the row calculations to bring this report. My code looks like below. Again, I have given the below code is at high level.POINTER have values --> LEFT,RIGHT

  

TABLE FILE MASTER
SUM VALUES
ACROSS POINTER
COMPUTE TOTAL/D12  =  ( all calculation logic will be here)
COMPUTE TESTCOL/D12.2 =  ( all calculation logic will be here)

FOR COUNTRY
'ENGLAND' OVER
'AFRICA' OVER
RECAP INDIA/D12 = R2/R1; OVER
"JAPAN" OVER
"RUSSIA"
END




Problem: When I use the RECAP to bring the row calculations, the same logic is applying for the computed columns which is TOTAL and TESTCOL and the computed logic which I have used is not applied and I'm getting wrong values for the computed columns.

is there any way to solve this issue. I have used column notation (c,r) for the RECAP row but the row calculation logic is applying till the last date column here in this case the date value is (05-10-2010) and from there onwards a blank cells are displaying. My output coming as below if I use the column notation

  
_________________________________________________________________________________________________
                | LEFT                           |               RIGHT                           |
 TOTAL COUNTRY  | 01-01-2010    |  01-02-2010    |  03-10-2010  |  05-10-2010   | TOTAL | TESTCOL|
=================================================================================================
 TOTAL ENGLAND  | 10           |  30            | 20          |  10           |  70    |   10%  |     
 TOTAL AFRICA   | 20           |  60            | 40          |  40           |  160   |    30% | 
 TOTAL INDIA    |  2           |  2             |  2          |   4           |        |        |
 TOTAL JAPAN    | 30           |  40            | 50          |  11           |  16%   |    60% | 
 TOTAL RUSSIA   | 30           |  50            | 20          |  12           |  112   |    10% |
_________________________________________________________________________________________________



If u see the above output...there are some blanks for the row INDIA for the computed columns TOTAL and TESTCOL. Ideally it should have a values as per the computed column logic implemented. Is there any way to resolve the issue.

Thanks!
December 20, 2010, 10:32 AM
RSquared
quote:
RECAP INDIA/D12 = R2/R1; OVER

Have you tried
COMPUTE INDIA/D12 = R2/R1; OVER
instead?


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
December 21, 2010, 09:30 AM
subbu
Hi,
I can't use the COMPUTE because in FML in order to create customized row I should use RECAP. If I use its throwing error.

One question I have can we display a normal by across report and a normal matrix report side by side...like below. I know using match I can achieve it but since I'm using the FML I'm facing a problem while calling two request in a single MATCH FILE request.

Note: I'm using FML to bring the Across report

Report1 Across Report:

  
            INDIA  GERMANY RUSSIA
      CAR   --------------------------
      BMW    10    20      30 
      JAGUAR 10    20      30
      MIPS   10    20      30



Report2 Normal matrix report:

  
        CITY  STATE 
        ------------
        10     20 
        20     30
        30     40  


My Final Report should look like below

  
            INDIA  GERMANY RUSSIA  CITY  STATE 
      CAR   ----------------------------------
      BMW    10    20      30      10     20 
      JAGUAR 10    20      30      20     30 
      MIPS   10    20      30      30     40 




Thanks!