Focal Point
[WORKAROUND / WAIT till "WF 8"] Compressed Expandable feature?

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

October 10, 2011, 10:26 AM
Doug
[WORKAROUND / WAIT till "WF 8"] Compressed Expandable feature?
Is there a FEATURE in a something (maybe in a newer version then 7.6.11) which "COMPRESSES" the output (width) of an "EXPANDABLE" report, without using multiple HOLD files, to produe an output similar to the below:
ENGLAND
  JAGUAR
    V12XKE AUTO
    XJ12L AUTO
  JENSEN
    INTERCEPTOR III
  TRIUMPH
    TR7
FRANCE
  PEUGEOT
    504 4 DOOR
ITALY
  ALFA ROMEO
    2000 4 DOOR BERLINA
    2000 GT VELOCE
    2000 SPIDER VELOCE
  MASERATI
    DORA 2 DOOR
Instead of the below:
COUNTRY   CAR              MODEL 
ENGLAND   JAGUAR           V12XKE AUTO 
                           XJ12L AUTO 
          JENSEN           INTERCEPTOR III 
          TRIUMPH          TR7 
FRANCE    PEUGEOT          504 4 DOOR 
ITALY     ALFA ROMEO       2000 4 DOOR BERLINA 
                           2000 GT VELOCE 
                           2000 SPIDER VELOCE 
MASERATI                   DORA 2 DOOR
I'd like to use this as drilldownable menu selection within a launch page.

Thanks in advance, Doug

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
October 10, 2011, 10:28 AM
Tom Flynn
FML


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 10, 2011, 10:31 AM
Doug
ARG... But, Thanks... Anyway within a "standard report" / fex / procedure? I'll check out FML in the meantime...
October 10, 2011, 10:52 AM
Tom Flynn
Doug, I think you are looking for Expand By Row, a 7.7 feature...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 10, 2011, 11:23 AM
Doug
quote:
Expand By Row, a 7.7 feature
That';s probably what I was thinking about. I heard something about that in Summit `11...
October 10, 2011, 11:28 AM
Tom Flynn
Hey Doug,

Dave Smith, Brinker, used jQuery and produced what I think you want. Also, Dan Satchell used WebFOCUS, but, with HOLD files.
You could also use multiple frames, if this is for a Dashboard type of function, and, drill into those frames.

Dave's and Dan's stuff here


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 10, 2011, 12:28 PM
Doug
Thanks Tom, Checking out Dave's and Dan's stuffnow... Cool
October 11, 2011, 10:21 AM
DavSmith
Hey Doug,

Tom's got a good memory! If you want the accordian capability pre 7.7, give it a try.

Since last year, I've come to embrace the McGyver light...if you don't want the accordian capability, this technique will work. See my other articles and posts for more on the technique but, try the folowing code and see if it gives you what you're looking for:

FILEDEF MCMAS DISK MCGYV.MAS
-RUN
-WRITE MCMAS FILENAME=mcgyv, SUFFIX=FIX     , $
-WRITE MCMAS   SEGMENT=ONE, SEGTYPE=S0, $
-WRITE MCMAS     FIELDNAME=CONTROL, USAGE=A1, ACTUAL=A1, $
-WRITE MCMAS   SEGMENT=TWO, SEGTYPE=S0, PARENT=ONE, OCCURS=VARIABLE, $
-WRITE MCMAS     FIELDNAME=CHAR1, USAGE=A1, ACTUAL=A1, $
-WRITE MCMAS     FIELDNAME=CTR, ALIAS=ORDER, USAGE=I4, ACTUAL=I4, $
FILEDEF MCGYV DISK MCGYV.FTM
-RUN
-WRITE MCGYV XABC
JOIN CONTROL WITH BODYTYPE IN CAR TO UNIQUE CONTROL IN MCGYV AS J2
DEFINE FILE CAR
CONTROL  /A1 WITH BODYTYPE='X';
SORT     /A50=IF CTR EQ 1 THEN COUNTRY     ELSE
              IF CTR EQ 2 THEN COUNTRY|CAR ELSE COUNTRY|CAR|MODEL;
DISPLAY  /A50=IF CTR EQ 1 THEN COUNTRY     ELSE
              IF CTR EQ 2 THEN '   '|CAR   ELSE '         '|MODEL;
END
SET SHOWBLANKS=ON
TABLE FILE CAR
SUM SALES/P12.2CM
BY SORT NOPRINT
BY DISPLAY AS ''
BY CTR NOPRINT
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
FONT='ARIAL', SIZE=10,GRID=OFF,$
TYPE=DATA,STYLE=BOLD       ,SIZE=12,BACKCOLOR='STEEL BLUE',COLOR=WHITE,WHEN=CTR EQ 1,$
TYPE=DATA,STYLE=BOLD+ITALIC,SIZE=10,WHEN=CTR EQ 2,$
TYPE=DATA,STYLE=NORMAL     ,SIZE=8 ,WHEN=CTR EQ 3,$
ENDSTYLE
END


Works in most of the popular output formats.

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



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
October 17, 2011, 02:49 PM
Doug
Tom ... Dave: Thanks...

Now, is there an EXPANDABLE version of this for HTML? The use of the same font sytle on each level is acceptable.
October 17, 2011, 03:23 PM
njsden
SET EXPANDBYROW=ON 
TABLE FILE CAR
SUM
	DEALER_COST
	RETAIL_COST
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
BY  CAR.CARREC.MODEL
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=10, GRID=OFF,$
END




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.
October 17, 2011, 04:12 PM
DavSmith
Doug, NJSDEN's example will work great under 7.7, but not with 7.6.

If you are at WF 7.6 (you're signature indicates that) or less and want the vertical accordian, a javascript solution such as found at the link Tom refers you to is probably you're best answer.



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
October 17, 2011, 04:39 PM
Doug
NJSDEN: Thanks, but no thanks. That's the standard "ON TABLE SET EXPANDABLE ON" functionality. I need a "compressed" (for the lack of a better word) version of that. Probably JavaScript ~ As DavSmith mentioned below.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
October 17, 2011, 04:42 PM
Doug
DavSmith: Thanks... Yep: 7.6.11. And, Yep: I "want the vertical accordian". And, Nope: I don't 'want' JS, but, I may 'need' JS... Picky, ain't I?
October 17, 2011, 04:46 PM
njsden
Hi Doug, I did not pay close attention to your platform version and therefore provided a solution that is not feasible in your case.

However, SET EXPANBYROW=ON does not provide the same standard functionality of SET EXPANDABLE=ON.

Set EXPANDBYROW does indeed create a tree-like structure where only the first level shows up with a (+) icon and inner levels are expanded in a row-like direction with their values contained *in the same column* which is what you expressed taht you needed.

EXPANDABLE on the contrary, displays each "expanded" inner level in a new column of their own (not by row) and that's what make those 2 settings different.

Anyway, EXPANDBYROW is useless to you as it's only available in 7.7.x and not in 7.6.11. Sorry for the misunderstanding.

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



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.
October 17, 2011, 05:14 PM
Doug
njsden<:
quote:
Anyway, EXPANDBYROW is useless to you as it's only available in 7.7.x and not in 7.6.11. Sorry for the misunderstanding.
Your apology is totally accepted (even though it was not needed).

We are coding something to a future upgrade of WebFOCUS 8. Unfortunately, this project needs to be in by the end of January 2012 and "8" is not happening till shortly after that.

Thanks again... I'll close this for now...