Focal Point
[SOLVED] SUB HEADER ISSUE

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

April 08, 2014, 10:16 AM
RobertF
[SOLVED] SUB HEADER ISSUE
Supression works fine at the subtotal level but fails to work on my subheader...is there a known issue with using this structure on a header?

.
.
.
ON HOLDDETAIL.CUSTGRP3 SUBTOTAL AS '*'
WHEN NOT HOLDDETAIL.CUSTGRP3 IN ('Other Stats', 'Other Rev');

ON HOLDDETAIL.CUSTGRP3 SUBFOOT
" "

ON HOLDDETAIL.CUSTGRP2 SUBHEAD "WHEN NOT HOLDDETAIL.CUSTGRP2 EQ 'Addendum'

ON HOLDDETAIL.CUSTGRP2 SUBTOTAL AS ''
WHEN NOT HOLDDETAIL.CUSTGRP2 IN ('wRVUs', 'Units','Salaries','Charges','Panel Size','Other Stats','Addendum');

ON HOLDDETAIL.CUSTGRP2 SUBFOOT
" ".
.
.

It fails to suprress the Sub header when the value = 'Addendum'.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8206.08
Windows, All Outputs
April 08, 2014, 10:18 AM
RobertF
quote:
ON HOLDDETAIL.CUSTGRP2 SUBHEAD "WHEN NOT HOLDDETAIL.CUSTGRP2 EQ 'Addendum'



..there was a typo in my post..should have read:
ON HOLDDETAIL.CUSTGRP2 SUBHEAD WHEN NOT HOLDDETAIL.CUSTGRP2 EQ 'Addendum'


WebFOCUS 8206.08
Windows, All Outputs
April 08, 2014, 03:54 PM
RobertF
this does not work either:

ON HOLDDETAIL.HOLDDETA.CUSTGRP2 SUBHEAD
"


WebFOCUS 8206.08
Windows, All Outputs
April 09, 2014, 08:14 AM
RobertF
not sure why my cut/paste not working...should have read...'this is not working either...'

ON HOLDDETAIL.HOLDDETA.CUSTGRP2 SUBHEAD
"


WebFOCUS 8206.08
Windows, All Outputs
April 09, 2014, 08:16 AM
RobertF
one more time...

ON HOLDDETAIL.HOLDDETA.CUSTGRP2 SUBHEAD

..note I have quotes around


WebFOCUS 8206.08
Windows, All Outputs
April 09, 2014, 08:17 AM
RobertF
must be an html thing....

ON HOLDDETAIL.HOLDDETA.CUSTGRP2 SUBHEAD
"CUSTGRP2"

(have a less than sign before CUSTGRP2 in actual code)


WebFOCUS 8206.08
Windows, All Outputs
April 09, 2014, 08:19 AM
RobertF
CLOSED*****


WebFOCUS 8206.08
Windows, All Outputs
April 09, 2014, 09:29 AM
njsden
Robert, please use [ CODE ] tags (without the spaces) around your code snippets so they get properly rendered.

A conditional subhead would look like this:
ON HOLDDETAIL.HOLDDETA.CUSTGRP2 SUBHEAD
"My subhead here"
WHEN HOLDDETAIL.CUSTGRP2 NE 'Addendum'




Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
April 10, 2014, 08:17 AM
RobertF
Thanks I will try that.


WebFOCUS 8206.08
Windows, All Outputs
April 11, 2014, 09:15 AM
RobertF
for some reason that does not work...it still shows the header even when it equals 'Addendum'

Similar code works at the subtotal level just not at the subheader.


WebFOCUS 8206.08
Windows, All Outputs
April 11, 2014, 03:22 PM
njsden
Please test this code:
TABLE FILE CAR
PRINT COUNTRY AND CAR AND MODEL
BY COUNTRY
ON COUNTRY SUBHEAD
"Country: <COUNTRY"
WHEN COUNTRY NE 'JAPAN'
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOPAGE
END


You should get a SUBHEAD for each COUNTRY except for JAPAN.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
April 15, 2014, 05:12 PM
RobertF
quote:
TABLE FILE CAR
PRINT COUNTRY AND CAR AND MODEL
BY COUNTRY
ON COUNTRY SUBHEAD
"Country: WHEN COUNTRY NE 'JAPAN'
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOPAGE
END

That works in the CAR file. Itried and see it. It does not work in my file. I'll try pasting my code in again...

[TABLE FILE HOLDDETAIL
SUM
HOLDDETAIL.HOLDDETA.TTLAMT/P20.2CB AS 'Ttl'
BY LOWEST CUSTGRP3SORT NOPRINT
BY LOWEST CUSTGRP3 NOPRINT
BY LOWEST CUSTGRP2SORT NOPRINT
BY LOWEST CUSTGRP2 NOPRINT
BY LOWEST CUSTGRP1SORT NOPRINT
BY LOWEST CUSTGRP1 NOPRINT
BY LOWEST SORTNBR NOPRINT AS 'Sort'
BY LOWEST DETAIL_GRPNM AS ' '
ACROSS LOWEST FY AS ' '
ACROSS LOWEST RPTBANBR AS 'Cost Centers'

ON CUSTGRP3 SUBTOTAL AS '*'
WHEN NOT CUSTGRP3 IN ('Other Stats');
ON CUSTGRP3 SUBFOOT
" "
ON CUSTGRP2 SUBHEAD
"


WebFOCUS 8206.08
Windows, All Outputs
April 15, 2014, 05:15 PM
RobertF
I am note sure what code tags are...I can not get my actual code posted, perhaps if someone tells me how I will post it. I though it was simple as putting '[' and ']' around the code.


WebFOCUS 8206.08
Windows, All Outputs
April 15, 2014, 05:16 PM
RobertF
one last try...wish they had a preview on this forum!

[TABLE FILE HOLDDETAIL
SUM
HOLDDETAIL.HOLDDETA.TTLAMT/P20.2CB AS 'Ttl'
BY LOWEST CUSTGRP3SORT NOPRINT
BY LOWEST CUSTGRP3 NOPRINT
BY LOWEST CUSTGRP2SORT NOPRINT
BY LOWEST CUSTGRP2 NOPRINT
BY LOWEST CUSTGRP1SORT NOPRINT
BY LOWEST CUSTGRP1 NOPRINT
BY LOWEST SORTNBR NOPRINT AS 'Sort'
BY LOWEST DETAIL_GRPNM AS ' '
ACROSS LOWEST FY AS ' '
ACROSS LOWEST RPTBANBR AS 'Cost Centers'

ON CUSTGRP3 SUBTOTAL AS '*'
WHEN NOT CUSTGRP3 IN ('Other Stats');
ON CUSTGRP3 SUBFOOT
" "
ON CUSTGRP2 SUBHEAD
"


WebFOCUS 8206.08
Windows, All Outputs
April 15, 2014, 05:17 PM
RobertF
no dice!


WebFOCUS 8206.08
Windows, All Outputs
April 16, 2014, 03:20 AM
Danny-SRL
Robert,

quote:
no dice!


You will get the tags for code by clicking on the right-most button in the reply post. It is easy to find as it is the only one in red.
Post your code with it and then we can try and help.


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

April 16, 2014, 09:19 AM
George Patton
Robert: If you look at the little icon bar above where you enter your message you'll see a button at the extreme right.

Click that and you will see the code tags. Just insert your code between those two tags. (You don't have to use the button - you can just type the respective tags at the top and bottom of your code).


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
April 16, 2014, 10:05 AM
RobertF
code:

TABLE FILE HOLDDETAIL
SUM 
     TTLAMT/P20.2CB AS 'Ttl'
BY  LOWEST CUSTGRP3SORT NOPRINT 
BY  LOWEST CUSTGRP3 NOPRINT 
BY  LOWEST CUSTGRP2SORT NOPRINT 
BY  LOWEST CUSTGRP2 NOPRINT 
BY  LOWEST CUSTGRP1SORT NOPRINT 
BY  LOWEST CUSTGRP1 NOPRINT 
BY  LOWEST SORTNBR NOPRINT  AS 'Sort'
BY  LOWEST DETAIL_GRPNM AS ' '
ACROSS LOWEST FY AS ' '
ACROSS LOWEST RPTBANBR AS 'Cost Centers'
     
ON CUSTGRP3 SUBTOTAL AS '*'  
WHEN NOT HOLDDETAIL.HOLDDETA.CUSTGRP3 IN ('Other Stats');

ON CUSTGRP3 SUBFOOT
" "

ON CUSTGRP2 SUBHEAD
"<CUSTGRP2 " WHEN CUSTGRP2 NE 'Addendum'

ON CUSTGRP2 SUBTOTAL AS ''  
WHEN NOT CUSTGRP2 IN ('wRVUs', 'Units','Salaries','Charges','Panel Size','Other Stats','Addendum','FTEs');
.
.
. 



All Subtotal supression works fine. Subhead...not so good....does not supress on: 'Addendum'


WebFOCUS 8206.08
Windows, All Outputs
April 16, 2014, 10:46 AM
Danny-SRL
Robert,

This worked for me:
  
-* File Robert2.fex
TABLE FILE CAR
SUM SALES
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY BODYTYPE
ACROSS SEATS
ON COUNTRY SUBTOTAL AS '*'
WHEN NOT COUNTRY IN ('FRANCE')
ON COUNTRY SUBFOOT
" "
ON CAR SUBHEAD
"<CAR "
WHEN CAR NE 'JAGUAR'
ON CAR SUBTOTAL
WHEN NOT CAR IN ('JAGUAR', 'MASERATI')
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
 INCLUDE=ENDEFLT, $
ENDSTYLE
END



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

April 16, 2014, 11:38 AM
RobertF
I believe you...just not sure why my code does not!


WebFOCUS 8206.08
Windows, All Outputs
April 16, 2014, 12:30 PM
Danny-SRL
If I may suggest, try some good old fashioned salami debugging: cut out all the superfluous, see that you get what you want and then add slice by slice...


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

April 16, 2014, 03:48 PM
njsden
[quote]
ON CUSTGRP2 SUBHEAD
"<CUSTGRP2 " WHEN CUSTGRP2 NE 'Addendum'
[quote]

RobertF, your code doesn't follow the syntax we suggested. The WHEN clause should be on a line of its own!

Try this:

...
ON CUSTGRP2 SUBHEAD
"<CUSTGRP2 "
WHEN CUSTGRP2 NE 'Addendum'
...




Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
April 16, 2014, 04:17 PM
RobertF
I think that was it...the WHEN on its own line...but I dicovered the solution thru another means that made no sense to me...so thanks for the post!

I whittled my code down to this:

 TABLE FILE HOLDDETAIL
BY  HOLDDETAIL.HOLDDETA.CUSTGRP2
     
ON HOLDDETAIL.HOLDDETA.CUSTGRP2 SUBHEAD
"<CUSTGRP2"  WHEN CUSTGRP2 NE 'Addendum';
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
END 



It was still acting up. So changed the report type to HTML. It worked. I then changed it back to Excel...to my surprise..it worked. It appears the GUI somehow dropped the WHEN to its own line. At least I understand it now..I was thinking it was some sort of bug.

THANKS ALL!!!


WebFOCUS 8206.08
Windows, All Outputs