Focal Point
[SOLVED] Simple Drill code yields weird results

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

February 04, 2020, 11:53 AM
Tomsweb
[SOLVED] Simple Drill code yields weird results
I have coded 2 simple fexes to utilize the
DRILL DOWN functionality in App Studio 8204.

Here is the "target" fex:

TABLE FILE CAR
PRINT
     CAR.BODY.DEALER_COST
     CAR.BODY.RETAIL_COST
     CAR.BODY.SALES
BY  CAR.ORIGIN.COUNTRY
WHERE CAR.ORIGIN.COUNTRY EQ &COUNTRY.(|FORMAT=A10).COUNTRY:.QUOTEDSTRING;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END


Here is the "source" fex:
TABLE FILE CAR
SUM 
     CAR.BODY.DEALER_COST AS 'DEALER'
     CAR.BODY.RETAIL_COST AS 'RETAIL'
     CAR.BODY.SALES
BY  CAR.ORIGIN.COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
TYPE=DATA,
DRILLMENUITEM='DrillDown 1',
FOCEXEC=REPORT105(PARAMETER=N1),
TARGET='_top',
$
ENDSTYLE
END


When I run the "source" focexec, I see a report looking
like this:

COUNTRY DEALER RETAIL SALES 
ENGLAND  37,853  45,319  12000  
FRANCE  4,631  5,610  0  
ITALY  41,235  51,065  30200  
JAPAN  5,512  6,478  78030  
W GERMANY  54,563  64,732  88190  


I am expecting to see the data elements in the COUNRTY column
(ENGLAND, FRANCE, ITALY, JAPAN, and W GERMANY) display a clickable
link to the "Target" focexec.

Unfortunately, I see that every cell in the report has a
clickable link to the target focexec. (Note: The title columns display
without the link).

Can anyone point out what is wrong ?

Thank you.

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
February 04, 2020, 12:06 PM
David Briars
Can you try adding the COLUMN attribute to the StyleSheet command?
TABLE FILE CAR
SUM 
     CAR.BODY.DEALER_COST AS 'DEALER'
     CAR.BODY.RETAIL_COST AS 'RETAIL'
     CAR.BODY.SALES
BY  CAR.ORIGIN.COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
TYPE=DATA, COLUMN = COUNTRY,
DRILLMENUITEM='DrillDown 1',
FOCEXEC=REPORT105(PARAMETER=N1),
TARGET='_top',
$
ENDSTYLE
END

Edit: Adding complete TABLE command.

This message has been edited. Last edited by: David Briars,
February 04, 2020, 01:34 PM
Tomsweb
TYPE=DATA,
     DRILLMENUITEM='DrillDown 1', COLUMN=COUNTRY,
          FOCEXEC=REPORT105(PARAMETER=N1),
          TARGET='_top',
$


I get an error:
INVALID KEYWORD: COLUMN


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
February 04, 2020, 01:50 PM
Tomsweb
This code WORKS !



TABLE FILE CAR
SUM 
     CAR.BODY.DEALER_COST AS 'DEALER'
     CAR.BODY.RETAIL_COST AS 'RETAIL'
     CAR.BODY.SALES
BY  CAR.ORIGIN.COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
TYPE=DATA,
 	COLUMN=N1,
    FOCEXEC=REPORT105(PARAMETER=N1),
    TARGET='_top',
$
ENDSTYLE
END
-RUN



Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
February 04, 2020, 02:03 PM
BabakNYC
I always reference COLUMN=columnname instead of N notation. That way if the sort order changes the drill down still works.

In your case, TYPE=DATA, COLUMN=COUNTRY, ..... will always pass the value of COUNTRY regardless of where COUNTRY is located in the TABLE request. However, COLUMN=N1 will pass the value of whatever field happens to be the first BY field.


WebFOCUS 8206, Unix, Windows
February 04, 2020, 04:45 PM
MartinY
Just a thought
TYPE=DATA,
   DRILLMENUITEM='DrillDown 1', COLUMN=COUNTRY,
   FOCEXEC=REPORT105(PARAMETER=N1),
   TARGET='_top',
$

Should maybe be
TYPE=DATA,
   COLUMN=COUNTRY,
   DRILLMENUITEM='DrillDown 1',
   FOCEXEC=REPORT105(PARAMETER=N1),
   TARGET='_top',
$

I think that COLUMN must appear before any other command


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
February 04, 2020, 04:54 PM
David Briars
Thanks Martin.

Yeah, I was scratching my head when Tom reported and error with my code, while it worked for me.

:-)

Yep, inserting the DRILLMENUITEM attribute, before COLUMN will give the FOC3209.