Focal Point
[CLOSED]Bring Across titles below subhead

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

May 21, 2016, 08:42 AM
Joe Mathews
[CLOSED]Bring Across titles below subhead
I have a report , which is split into multiple reports based on a field name(ON FIELD_NAME SUBHEAD ). I have an across field which appears above the entire report instead of getting displayed in each report. Please suggest me how to display the across fields in each split report which should be under subhead.

Example,

Class:9th Class Teacher: XYZ ---------------> subhead
English | Physics | Chemistry ---------------> across field should get displayed like this
Student
------------------------------------------
A 90 | 80 | 80
B 95 | 85 | 87
-------------------------------------------
Class:10th Class Teacher: ABCD ---------------> subhead
English | Physics | Chemistry ---------------> across field should get displayed like this
Student
------------------------------------------
A 90 | 80 | 80
B 95 | 85 | 87
-------------------------------------------
Class:12th Class Teacher: EFGH ---------------> subhead
English | Physics | Chemistry ---------------> across field should get displayed like this
Student
------------------------------------------
A 90 | 80 | 80
B 95 | 85 | 87

I am new to webfocus so please explain me clearly.



Thanks,
Johjen Mathew

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows, All Outputs
May 22, 2016, 03:40 PM
George Patton
This should give you an idea:

TABLE FILE XYZ
PRINT 
GRADE NOPRINT
MARKS
BY TEACHER NOPRINT
ACROSS SUBJECT AS ''
BY STUDENT
ON TEACHER SUBHEAD
"Class: <GRADE Class Teacher: <TEACHER "
etc


You might want to rearrange that a bit depending on your data:

TABLE FILE XYZ
PRINT 
TEACHER NOPRINT
MARKS
BY GRADE NOPRINT
ACROSS SUBJECT AS ''
BY STUDENT
ON GRADE SUBHEAD
"Class: <GRADE Class Teacher: <TEACHER "
etc


or you could do it as a multi-verb request:

TABLE FILE XYZ
PRINT 
GRADE NOPRINT
BY TEACHER NOPRINT
PRINT
MARKS
BY TEACHER NOPRINT
ACROSS SUBJECT AS ''
BY STUDENT
ON TEACHER SUBHEAD
"Class: <GRADE Class Teacher: <TEACHER "
etc



WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
May 24, 2016, 03:14 PM
Danny-SRL
Joe,
The problem is that SUBHEAD is always below the TITLEs. If you want to have the TITLEs below the SUBHEAD you want to do away with the TITLEs and insert the value of the TITLEs into the SUBHEAD.
Here is an example using the CAR file:
  
-SET &ECHO=ALL;
-* File joem01.fex
TABLE FILE CAR
BY SEATS
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
-SET &NSEATS=&LINES;
-RUN
DEFINE FILE CAR
-REPEAT #DEF FOR &I FROM 1 TO &NSEATS;
-READ SAVE,&S.&I
RC&I/D6=IF SEATS EQ &S.&I THEN RCOST ELSE 0;
-#DEF
END
 
TABLE FILE CAR
SUM 
-REPEAT #SUM FOR &I FROM 1 TO &NSEATS;
RC&I AS ''
-#SUM
BY COUNTRY NOPRINT
BY CAR AS ''
ON COUNTRY SUBHEAD
"Country:<COUNTRY"
-SET &L2='CAR';
-REPEAT #SHD FOR &I FROM 1 TO &NSEATS;
-SET &L2=&L2 || '<+0>' || &S.&I;
-#SHD
"&L2 "
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
 INCLUDE=ENDEFLT,
$
TYPE=SUBHEAD, HEADALIGN=BODY, 
$
TYPE=SUBHEAD, LINE=2, JUSTIFY=RIGHT, $
TYPE=SUBHEAD, LINE=2, ITEM=1, JUSTIFY=LEFT, $

ENDSTYLE
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF