Focal Point
[SOLVED] COLSPAN works with HTML by not EXCEL

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

October 01, 2019, 04:12 PM
Jveselka
[SOLVED] COLSPAN works with HTML by not EXCEL
WF AppStudio 8105m

Why does this code work in HTML by not EXL07

  
DEFINE FILE CAR
BLK/A1='';
END
TABLE FILE CAR
PRINT COUNTRY CAR MODEL BODYTYPE BLK AS '' SEATS DEALER_COST RETAIL_COST SALES BLK AS '' LENGTH WIDTH HEIGHT WEIGHT WHEELBASE 
 
ON TABLE SUBTOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'Grand Total'
 
SUBHEAD
"Why does this work in HTML but not EXL07"
""
HEADING
"This will colspan4<0+> <0+>This will colspan4<0+> <0+>This will colspan5"
-*ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
	 GRID=ON,
$
TYPE=REPORT,
     FONT='Verdana',
     SIZE=10,
$
TYPE=TABHEADING,
     FONT='Verdana',
     JUSTIFY=LEFT,
	 COLOR=BLACK,
	 STYLE=BOLD,
	 SIZE=12,
$
TYPE=HEADING,
     HEADALIGN=BODY,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=1,
     FONT='Verdana',
     JUSTIFY=CENTER,
	 OBJECT=TEXT,
	 STYLE=BOLD,
	 COLSPAN=4,
	 BACKCOLOR=RGB(50 50 50),
	 COLOR=WHITE,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=1,
     FONT='Verdana',
     JUSTIFY=CENTER,
	 OBJECT=FIELD,
	 STYLE=BOLD,
	 COLSPAN=4,
	 BACKCOLOR=RGB(50 50 50),
	 COLOR=WHITE,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=2,
     FONT='Verdana',
     JUSTIFY=CENTER,
     OBJECT=FIELD,
	 STYLE=BOLD,
	 COLSPAN=1,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=3,
     FONT='Verdana',
     JUSTIFY=CENTER,
	 OBJECT=TEXT,
	 STYLE=BOLD,
	 COLSPAN=4,
	 BACKCOLOR=RGB(50 50 50),
	 COLOR=WHITE,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=3,
     FONT='Verdana',
     JUSTIFY=CENTER,
	 OBJECT=FIELD,
	 STYLE=BOLD,
	 COLSPAN=4,
	 BACKCOLOR=RGB(50 50 50),
	 COLOR=WHITE,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=4,
     FONT='Verdana',
     JUSTIFY=CENTER,
     OBJECT=FIELD,
	 STYLE=BOLD,
	 COLSPAN=1,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=5,
     FONT='Verdana',
     JUSTIFY=CENTER,
	 OBJECT=TEXT,
	 STYLE=BOLD,
	 COLSPAN=5,
	 BACKCOLOR=RGB(50 50 50),
	 COLOR=WHITE,
$
TYPE=HEADING,
     LINE=1,
	 ITEM=5,
     FONT='Verdana',
     JUSTIFY=CENTER,
	 OBJECT=FIELD,
	 STYLE=BOLD,
	 COLSPAN=5,
	 BACKCOLOR=RGB(50 50 50),
	 COLOR=WHITE,
$
ENDSTYLE
END

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8105m
Windows, All Outputs
October 01, 2019, 04:22 PM
FP Mod Chuck
Jveselka

Your right it won't work with EXL07 or XLSX but does work with EXL2K.. But I have no clue why.. Sorry


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 01, 2019, 04:30 PM
Tom Flynn
DEFINE FILE CAR
BLK/A1='';
END
TABLE FILE CAR
PRINT COUNTRY CAR MODEL BODYTYPE BLK AS '' SEATS DEALER_COST RETAIL_COST SALES BLK AS '' LENGTH WIDTH HEIGHT WEIGHT WHEELBASE
BY BLK NOPRINT
ON TABLE SUBTOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'Grand Total'

ON BLK SUBHEAD
"Why does this work in HTML but not EXL07"
""
HEADING
"This will colspan4<0+> <0+>This will colspan4<0+> <0+>This will colspan5"
-*ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
GRID=ON,
$
TYPE=REPORT,
FONT='Verdana',
SIZE=10,
$
TYPE=TABHEADING,
FONT='Verdana',
JUSTIFY=LEFT,
COLOR=BLACK,
STYLE=BOLD,
SIZE=12,
$

TYPE=SUBHEAD, HEADALIGN=BODY, COLSPAN=15,$

TYPE=HEADING,
HEADALIGN=BODY,
$
TYPE=HEADING,
LINE=1,
ITEM=1,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=TEXT,
STYLE=BOLD,
COLSPAN=4,
BACKCOLOR=RGB(50 50 50),
COLOR=WHITE,
$
TYPE=HEADING,
LINE=1,
ITEM=1,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=FIELD,
STYLE=BOLD,
COLSPAN=4,
BACKCOLOR=RGB(50 50 50),
COLOR=WHITE,
$
TYPE=HEADING,
LINE=1,
ITEM=2,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=FIELD,
STYLE=BOLD,
COLSPAN=1,
$
TYPE=HEADING,
LINE=1,
ITEM=3,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=TEXT,
STYLE=BOLD,
COLSPAN=4,
BACKCOLOR=RGB(50 50 50),
COLOR=WHITE,
$
TYPE=HEADING,
LINE=1,
ITEM=3,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=FIELD,
STYLE=BOLD,
COLSPAN=4,
BACKCOLOR=RGB(50 50 50),
COLOR=WHITE,
$
TYPE=HEADING,
LINE=1,
ITEM=4,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=FIELD,
STYLE=BOLD,
COLSPAN=1,
$
TYPE=HEADING,
LINE=1,
ITEM=5,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=TEXT,
STYLE=BOLD,
COLSPAN=5,
BACKCOLOR=RGB(50 50 50),
COLOR=WHITE,
$
TYPE=HEADING,
LINE=1,
ITEM=5,
FONT='Verdana',
JUSTIFY=CENTER,
OBJECT=FIELD,
STYLE=BOLD,
COLSPAN=5,
BACKCOLOR=RGB(50 50 50),
COLOR=WHITE,
$
ENDSTYLE
END


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 01, 2019, 04:41 PM
Jveselka
There's got to be a way to make this work....It seems to work on the first span but then it gets lost.


WebFOCUS 8105m
Windows, All Outputs
October 01, 2019, 04:46 PM
Jveselka
Tom, did that work for you? I can't make it happened on my end.


WebFOCUS 8105m
Windows, All Outputs
October 01, 2019, 04:54 PM
Tom Flynn
Yes - works perfectly!
Will update my Profile: 8.1.05m Server
Added BACKCOLOR=TAN to double-check, works...
Trying to find a site to upload...

TYPE=SUBHEAD, HEADALIGN=BODY, COLSPAN=15, BACKCOLOR=TAN, $

See if you can see this:

EXL07 Car Report

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 01, 2019, 05:02 PM
Tom Flynn
Added the image, hope you can get to it...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 01, 2019, 05:04 PM
Jveselka
Nope, did you opened it with EXL07 and you are on 8105m?


WebFOCUS 8105m
Windows, All Outputs
October 01, 2019, 05:06 PM
Tom Flynn
Yes, and, Yes...
What site can you get to for images?


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 01, 2019, 05:07 PM
Jveselka
Please email to jveselka@txfb-ins.com


WebFOCUS 8105m
Windows, All Outputs
October 01, 2019, 05:11 PM
Tom Flynn
Incoming - Let me know that you received it...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 01, 2019, 05:19 PM
Jveselka
That is not what I need. Run it in HTML and you will see how it should look.

The ""Why does this work in HTML but not EXL07" should stay at the top and about each column should be the span
"This will colspan4<0+> <0+>This will colspan4<0+> <0+>This will colspan5"

Maybe I have my SUBHEAD and HEADING out of place.

I emailed you a pic


WebFOCUS 8105m
Windows, All Outputs
October 01, 2019, 05:27 PM
Jveselka
Or better yet, just set my original code to output to EXL2K. This will show you how I want it, but EXL2K is a SOB to open due to all the popups.

Thanks
JV


WebFOCUS 8105m
Windows, All Outputs
October 01, 2019, 05:36 PM
Tom Flynn
I do see minor differences - Don't code in the GUI, so, there's that...

Not going to debug all the styling for the HEADING;
Something is overriding something, I'm sure you'll figure it out...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 02, 2019, 10:26 AM
Jveselka
Here is a better example

Run it as is and you will see that the COLSPAN works for both ITEM1 and ITEM2 but ITEM2 is not displaying HELLO. If you comment out the call for ITEM1, HELLO shows up but ITEM1 is now only over the first column (as it should without call).

 
TABLE FILE CAR
SUM SALES BY COUNTRY BY CAR BY MODEL BY SEATS BY CAR
ON COUNTRY SUBHEAD
"This is my subhead<0+>HELLO"
" "
"Country is:<COUNTRY Car is:<CAR"
"Model is:<MODEL"
IF COUNTRY EQ 'ENGLAND'
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLESHEET * 
TYPE=SUBHEAD, HEADALIGN=BODY, $ 
TYPE=SUBHEAD, LINE=1, ITEM=1, COLSPAN=2, JUSTIFY=CENTER, $ 
TYPE=SUBHEAD, LINE=1, ITEM=2, COLSPAN=2, JUSTIFY=CENTER, $ 
ENDSTYLE
END
 


Again this works fine in HTML and EXL2K
Is <0+> the right function to separate the two items?


WebFOCUS 8105m
Windows, All Outputs
October 02, 2019, 10:55 AM
Tom Flynn
It's <+0> - not <0+>

TABLE FILE CAR
SUM SALES BY COUNTRY BY CAR BY MODEL BY SEATS BY CAR
ON COUNTRY SUBHEAD
"This is my subhead<+0>HELLO<+0>"
" "
"Country is:<COUNTRY Car is:<CAR"
"Model is:<MODEL"
IF COUNTRY EQ 'ENGLAND'
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=SUBHEAD, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=SUBHEAD, LINE=1, ITEM=1, COLSPAN=2, JUSTIFY=CENTER, $
TYPE=SUBHEAD, LINE=1, ITEM=2, COLSPAN=2, JUSTIFY=CENTER, $
ENDSTYLE
END

-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 02, 2019, 11:11 AM
FP Mod Chuck
Good One I went back to the original example and replaced the <0+> with <+0> and all is well.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 09, 2019, 02:42 PM
Jveselka
YES>>>>I figured it out and I can't believe what it was........

This

"<0+> <0+> <0+>This is my<0+> <0+>heading<0+> <0+>line2"

should be

"<+0> <+0> <+0>This is my<+0> <+0>heading<+0> <+0>line2"



My bad....ughhhh

Thanks


WebFOCUS 8105m
Windows, All Outputs