Focal Point
drilldown not working

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

November 19, 2009, 07:29 PM
dev532
drilldown not working
Hi,
The fex below has a drilldown on the second column. The first column being printed is a defined column. If that column is not chosen or gets 'FOC_NONE', the drill down shifts to the next column. So instead of the second column being the drilld own, the next columns becomes the drilldown. How do I fix this?

-SET &col1 = IF (&box2 EQ 'N') THEN 'FOC_NONE' ELSE 'COUNTRY' ;
-SET &col2 = IF (&box3 EQ 'N') THEN 'FOC_NONE' ELSE 'CAR' ;
-SET &col3 = IF (&box4 EQ 'N') THEN 'FOC_NONE' ELSE 'MODEL' ;
-SET &col4 = IF (&box5 EQ 'N') THEN 'FOC_NONE' ELSE 'SALES' ;
-SET &abc = IF (&box25 EQ 'N') THEN 'FOC_NONE' ELSE 'ABC' ;


DEFINE FILE CAR
ABC/A3 = IF ('&abc' EQ 'ABC') THEN 'ABC' ELSE '&abc' ;
END

TABLE FILE CAR
PRINT
&abc AS FIRST
&col1 AS 'COUNTRY'
&col2 AS 'CAR'
&col3 AS 'MODEL'
&col4 AS 'SALES'
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,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N2,
FOCEXEC=test7(start=N3 stop=N4),
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END


WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
November 19, 2009, 07:43 PM
Waz
Try changing COLUMN=N2 to COLUMN=P2

You may have to determine the actual column and use COLUMN=&boxn.


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 20, 2009, 11:32 AM
BarryS
Your &col1, &col2, ... are to display columns and not in a where clause so you cannot use FOC_NONE as a column name. When I set them to the column names the report appeared to work


WebFOCUS 8103, Windows, App Studio
November 20, 2009, 12:51 PM
Darin Lee
The only way around this is to dynamically determine the column associated with the drill-down. Because you are using FOC_NONE (which I agree with Waz that it shouldn't be used sparingly in a column display context - but to each his/her own) to dynamically change the columns for display, the column references (N1,N2, ...) are also dynamically changing.

So you would need to create some Dialogue Manager to calculate needed column references based on selected column. Those variable would then replace the N2, N3, and N4 references in your drilldown code in the stylesheet.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
November 23, 2009, 12:45 AM
StuBouyer
Remember that just because Developer Studio refers to the columns by Nx doesn't mean that you have to too.

Replace your COLUMN=N2, with COLUMN=&DRILL_COL, and calculate the value &DRILL_COL should have.

I also don't like the idea of FOC_NONE as a column name, and would change you code to something like this:

-SET &abc = IF (&box25 EQ 'N') THEN 'FOC_NONE' ELSE 'ABC' ;
-SET &MYCOLS = IF (&box25 EQ 'N') THEN '' ELSE 'ABC AS ''FIRST''';
-SET &MYCOLS = IF (&box2 EQ 'N') THEN &MYCOLS ELSE (&MYCOLS | ' COUNTRY AS ''COUNTRY''') ;
-SET &MYCOLS = IF (&box3 EQ 'N') THEN &MYCOLS ELSE (&MYCOLS | ' CAR AS ''CAR''') ;
-SET &MYCOLS = IF (&box4 EQ 'N') THEN &MYCOLS ELSE (&MYCOLS | ' MODEL AS ''MODEL''') ;
-SET &MYCOLS = IF (&box5 EQ 'N') THEN &MYCOLS ELSE (&MYCOLS | ' SALES AS ''SALES''') ;

-SET &DRILL_COL = IF (&box2 EQ 'Y') THEN 'COUNTRY' ELSE 
- IF (&box3 EQ 'Y') THEN 'CAR' ELSE
- IF (&box4 EQ 'Y') THEN 'MODEL' ELSE
- IF (&box5 EQ 'Y') THEN 'SALES' ELSE 'OOPS';

DEFINE FILE CAR
ABC/A3 = IF ('&abc' EQ 'ABC') THEN 'ABC' ELSE '&abc' ;
END

TABLE FILE CAR
PRINT
&MYCOLS
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,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=&DRILL_COL,
FOCEXEC=test7(start=N3 stop=N4),
$
ENDSTYLE
END  


NOTE: If you want the default titles for the columns then you can change the line
-SET &MYCOLS = IF (&box2 EQ 'N') THEN &MYCOLS ELSE (&MYCOLS | ' COUNTRY AS ''COUNTRY''') ;

to simply be
-SET &MYCOLS = IF (&box2 EQ 'N') THEN &MYCOLS ELSE (&MYCOLS | ' COUNTRY') ;


You will probably want to change your drill down parameters to variables to.

Cheers

Stu

p.s. I stripped out some of the report formating to save space


WebFOCUS 8.2.03 (8.2.06 in testing)
November 24, 2009, 01:58 AM
Tony A
quote:
NOTE: If you want the default titles for the columns then you can
.. also add the column titles via your .mas.

If your data is a temporary or transient file, any pre-existing columns (i.e not defined or computed) will retain the title attribute from the original .mas (if you have the correct environment settings).

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10