Focal Point
[SOLVED] How to freeze the columns?

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

July 12, 2010, 02:26 AM
<BI green hand>
[SOLVED] How to freeze the columns?
Hi,everybody!
Confused
How to freeze the columns 'ID,PRODUCT_CODE,PRODUCT_NAME',the output format is html or exl2k.
eg.

TABLE FILE RETAIL
SUM
FORECAST_QTY
ORDER_QTY
RETAIL_GAP
AVE.RETAIL_RATE
BY ID
BY PRODUCT_CODE
BY PRODUCT_NAME
ACROSS WEEK AS ''

This message has been edited. Last edited by: Kerry,
July 12, 2010, 04:44 AM
MrM
Hi

This works for HTML: HFREEZE=ON,

example :

SET LINES = 99999

TABLE FILE GGORDER
PRINT
'GGORDER.ORDER01.QUANTITY'
BY 'GGORDER.ORDER02.PRODUCT_ID'
BY 'GGORDER.ORDER02.PRODUCT_DESCRIPTION'
BY 'GGORDER.ORDER01.ORDER_NUMBER'
BY 'GGORDER.ORDER01.ORDER_DATE'
BY 'GGORDER.ORDER01.STORE_CODE'
BY 'GGORDER.ORDER01.PRODUCT_CODE'
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
HFREEZE=ON,
ORIENTATION=PORTRAIT,
$
ENDSTYLE
END
July 12, 2010, 05:11 AM
GamP
True, that works, but the question is how it to freeze the by-columns. I know that it can be done by using javascript - for html. That obviously will not work for excel, but I do seem to remember a post in this forum some time ago that might offer a solution. Maybe doing a thorough search will reveal the information you need.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 12, 2010, 07:08 AM
<JG>
HFREEZE only works if you are on the correct version of 76. But it only freezes headers and footers not columns, for that use JS as suggested by GamP.
For Excel use a template
July 12, 2010, 05:31 PM
Waz
There are techniques to freeze columns in HTML, but from memory, it works for IE only. There may be other techniques as well, but I would suggest searching the internet.

As for Excel, perhaps using a template will help ?


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!

July 15, 2010, 09:13 PM
<BI green hand>
Thanks! I find the suggestions in the Forums
about the solution that can help me !

I LOVE IB!
July 15, 2010, 09:26 PM
Waz
Can you post what your solution is ?


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 15, 2010, 02:41 PM
Danny
Can some one post the solution for this


7.6.4, OS/400 AS/400
August 04, 2011, 04:49 PM
Doug
I can see that no one posted a solution to this. But, I'll add an issue to get things going.

Watch the HEADING disappear when you execute this code and let me know how to make it NOT disappear... It's in the TYPE=HEADING, I think. Confused
TABLE FILE GGSALES
HEADING
"THIS IS: HEADING"
PRINT
UNITS/D12.2M
DOLLARS/D12.2M
ACROSS REGION SUBTOTAL AS 'Total for:'
BY CATEGORY
BY PRODUCT
WHERE CATEGORY EQ 'Coffee'
FOOTING
"THIS IS: FOOTING"
ON TABLE SUBHEAD
"THIS IS: ON TABLE SUBHEAD"
ON TABLE SUBFOOT
"THIS IS: ON TABLE SUBFOOT"
ON TABLE SET PAGE OFF
ON TABLE SUBTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT, FONT='Trebuchet MS', SIZE=12, GRID=OFF, HFREEZE=ON,$
TYPE=HEADING, ITEM=2,POSITION=.75, COLOR=RED,$
ENDSTYLE
END

This message has been edited. Last edited by: Doug,
August 04, 2011, 06:11 PM
Tom Flynn
Works perfectly fine for me - 7.6.11. I added some color!

BTW, without spot markers, there is no ITEM=2 in the HEADING...

  
APP PREPENDPATH IBISAMP
TABLE FILE GGSALES
HEADING
"THIS IS: HEADING"
PRINT
UNITS/D12.2M
DOLLARS/D12.2M
ACROSS REGION SUBTOTAL AS 'Totals'
BY CATEGORY
BY PRODUCT
WHERE CATEGORY EQ 'Coffee'
FOOTING
"THIS IS: FOOTING"
ON TABLE SUBHEAD
"THIS IS: ON TABLE SUBHEAD"
ON TABLE SUBFOOT
"THIS IS: ON TABLE SUBFOOT"
ON TABLE SET PAGE OFF
ON TABLE SUBTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT, FONT='Trebuchet MS', SIZE=12, GRID=OFF, HFREEZE=ON,$
TYPE=ACROSSTITLE, BACKCOLOR=BLUE, COLOR=WHITE, JUSTIFY=CENTER, $
TYPE=ACROSSVALUE, BACKCOLOR=GREEN, COLOR=WHITE,$
TYPE=TITLE, BACKCOLOR=GREEN, COLOR=WHITE,$
TYPE=GRANDTOTAL, BACKCOLOR=TAN, COLOR=BLACK,$
TYPE=HEADING, ITEM=2,POSITION=.75, COLOR=RED,$
ENDSTYLE
END
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 04, 2011, 06:16 PM
Doug
Thanks Tom,

But, what was it exactly which caused the issue? Here's the differences:
Douglas Lee: FileDif Results
****************************

Comparing files Dougs.fex and Toms.Fex
***** Dougs.fex
    6:  DOLLARS/D12.2M
    7:  ACROSS REGION SUBTOTAL AS 'Total for:'
    8:  BY CATEGORY
***** Toms.fex
    6:  DOLLARS/D12.2M
    7:  ACROSS REGION SUBTOTAL AS 'Totals'
    8:  BY CATEGORY
*****

***** Dougs.fex
   23:  TYPE=REPORT, FONT='Trebuchet MS', SIZE=12, GRID=OFF, HFREEZE=ON,$
   24:  TYPE=HEADING, ITEM=2,POSITION=.75, COLOR=RED,$
***** Toms.fex
   23:  TYPE=REPORT, FONT='Trebuchet MS', SIZE=12, GRID=OFF, HFREEZE=ON,$
   24:  TYPE=ACROSSTITLE, BACKCOLOR=BLUE, COLOR=WHITE, JUSTIFY=CENTER,$
   25:  TYPE=ACROSSVALUE, BACKCOLOR=GREEN, COLOR=WHITE,$
   26:  TYPE=TITLE, BACKCOLOR=GREEN, COLOR=WHITE,$
   27:  TYPE=GRANDTOTAL, BACKCOLOR=TAN, COLOR=BLACK,$
   28:  TYPE=HEADING, ITEM=2,POSITION=.75, COLOR=RED,$
*****

August 04, 2011, 06:29 PM
Tom Flynn
Doug, all that I added was the color and changed Totals For: to Totals, that was it, as you can see from the compare!

The TYPE=HEADING doesn't get invoked since there is only ITEM=1, AND, POSITION is for PDF, not HTML...

Like I said, worked fine for me!!!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 05, 2011, 09:23 AM
Doug
Thanks Tom,

I see that was all that you added. Cool So, I take it that the work-around is to add more style to it. Roll Eyes I can do that.Smiler

1) POSITION does work in HTML, if only for a second or two.
2) This seems to be more of an "Undocumented feature (function)" associated with HFREEZE.

Try it with HFREEZE=OFF and the tagged HEADING items display as expected.

I added more ITEMs for this demo.
TABLE FILE GGSALES
HEADING
"<+0>THIS IS A: <+0>HEADING <+0>3 <+0>4 <+0>5 <+0>6"
PRINT
UNITS/D12.2M
DOLLARS/D12.2M
ACROSS REGION SUBTOTAL AS 'Total for:'
BY CATEGORY
BY PRODUCT
WHERE CATEGORY EQ 'Coffee'
FOOTING
"THIS IS: FOOTING"
ON TABLE SUBHEAD
"THIS IS: ON TABLE SUBHEAD"
ON TABLE SUBFOOT
"THIS IS: ON TABLE SUBFOOT"
ON TABLE SET PAGE OFF
ON TABLE SUBTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT, FONT='Trebuchet MS', SIZE=12, GRID=OFF, HFREEZE=ON,$
TYPE=HEADING, ITEM=2,POSITION=.75, COLOR=RED,$
TYPE=HEADING, ITEM=4,POSITION=1.75, COLOR=BLUE,$
ENDSTYLE
END

August 05, 2011, 09:28 AM
Doug
quote:
This seems to be more of an "Undocumented feature (function)" associated with HFREEZE.

Or, maybe with "ON TABLE SET HTMLCSS ON/OFF". It works with HTMLCSS OFF. But, of course, the STYLEs need to be adjusted accordingly.