Focal Point
[SOLVED] COLSPAN

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

November 03, 2014, 03:43 PM
MattC
[SOLVED] COLSPAN
I am lost here so hopefully I can get some help here.

I have a heading with spot markers in my program

HEADING
"Site: &DRILLVALUE"
" "
"Timecard Punches of Record<+0>Shift<+0>Original Break Records (Edited)"

  


I also have

 
TYPE=HEADING,
     HEADALIGN=BODY,
$

 




I also have

TYPE=HEADING,
     LINE=3,
     ITEM=1,
     COLSPAN=7,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=3,
     ITEM=2,
-*   COLSPAN=&Shift_Colspan,
     COLSPAN=3,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=3,
     ITEM=3,
     COLSPAN=3,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
  



The first item aligns fine, it's the second and third item that is causing me grief. The problem is, is that I have dynamic columns that turn on/off on an existence check in the report. I tried creating logic to to set COLSPAN based on that logic and it somewhat works but it's not good.

Any other type of magic that I could use?

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


WebFOCUS 8.1.05
November 03, 2014, 03:58 PM
Waz
I have done similar, and calced the columns, and had no problems.

What happens when you use the & vaariable ?


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!

November 03, 2014, 04:42 PM
MattC
This report is very wide. I have 5 sections consisting of 3 columns each that are dynamically displayed.

The first 8 columns are always there, then the next 15 columns are dynamic. After that is another few columns and above that is where I want to have my heading. When all 5 sections are displayed, the heading ends up being aligned over one of the dynamic columns.

I want to say there is a limitation on width as so why this can't work, but there has to be another approach.


WebFOCUS 8.1.05
November 03, 2014, 05:01 PM
Waz
Can you replicate this with one of the sample files ?


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!

November 04, 2014, 08:21 AM
MattC
Hi Waz,

Thanks for the responses. Maybe COLSPAN isn't what I am looking for. Simplifying with this CAR example, I really don't want my second heading to be spanned across the next X amount of columns.

Maybe I will look at using POSITION


 
-* File Car_rpt.fex
-SET &ECHO ='ALL';

TABLE FILE CAR
PRINT COUNTRY
      CAR
      COMPUTE CAR1/A16 = CAR;
      COMPUTE CAR2/A16 = CAR;
	COMPUTE CAR3/A16 = CAR;
	COMPUTE CAR4/A16 = CAR;
	COMPUTE CAR5/A16 = CAR;
	COMPUTE CAR6/A16 = CAR;
	COMPUTE CAR7/A16 = CAR;
	COMPUTE CAR8/A16 = CAR;
	COMPUTE CAR9/A16 = CAR;
	COMPUTE CAR10/A16 = CAR;
	COMPUTE CAR11/A16 = CAR;
	COMPUTE CAR12/A16 = CAR;
	COMPUTE CAR13/A16 = CAR;
	COMPUTE CAR14/A16 = CAR;
	COMPUTE CAR15/A16 = CAR;
	COMPUTE CAR16/A16 = CAR;
	COMPUTE CAR17/A16 = CAR;
	COMPUTE CAR18/A16 = CAR;
	COMPUTE CAR19/A16 = CAR;
	COMPUTE CAR20/A16 = CAR;
	COMPUTE CAR21/A16 = CAR;
	COMPUTE CAR22/A16 = CAR;
	COMPUTE CAR23/A16 = CAR;
	COMPUTE CAR24/A16 = CAR;
	COMPUTE CAR25/A16 = CAR;
	COMPUTE CAR26/A16 = CAR;
	COMPUTE CAR27/A16 = CAR;
	COMPUTE CAR28/A16 = CAR;
      MODEL
      BODYTYPE
      SEATS
      DEALER_COST
      RETAIL_COST
      SALES
      LENGTH
      WIDTH
      HEIGHT
      WEIGHT
      WHEELBASE
      FUEL_CAP
      BHP
      RPM
      MPG
      ACCEL


HEADING
"Example:"
" "
"HEADING1<+0>HEADING2<+0>HEADING3"


ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$

TYPE=REPORT,
     WRAP=OFF,
     GRID=ON,
     FONT='ARIAL',
     SIZE=8,
     HEADPANEL=ON,
$
TYPE=HEADING,
     HEADALIGN=INTERNAL,
$
TYPE=HEADING,
     LINE=1,
     ITEM=1,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=3,
     ITEM=1,
     COLSPAN=7,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$

TYPE=HEADING,
     LINE=3,
     ITEM=2,
     COLSPAN=21,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$

-*TYPE=HEADING,
-*     LINE=3,
-*     ITEM=3,
-*     COLSPAN=7,
-*     STYLE=BOLD,
-*     JUSTIFY=CENTER,
-*$
-*

END
-RUN
 



WebFOCUS 8.1.05
November 04, 2014, 10:21 AM
MattC
Using POSITION worked better and got me closer to what I needed.

I was a bit foggy on COLSPAN, but when using a simple car file example it makes more sense to me now.


WebFOCUS 8.1.05