Focal Point
[Solved]How to do drilldown on sorted BY field in an Accordion EXPANDBYROW report.

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

August 03, 2015, 09:06 AM
Emily Lee
[Solved]How to do drilldown on sorted BY field in an Accordion EXPANDBYROW report.
For Accordion EXPANDBYROW report, I can make drilldown on the measured fileds such as 'BUDUNITS', 'UNITS', 'BUDDOLLARS', ...ect. My question is can I provide drilldown on each Sort By field?
How to drilldown on REGION, and ST? Can I provide a drilldown on Region, when user click, it will pass 'the Region name', and dispay a graphic; also priovide a drilldown on ST, which when user click, will pass the selected ST name? Thanks in advanced.

 

SET EXPANDBYROW=ON
TABLE FILE GGSALES
SUM BUDUNITS UNITS BUDDOLLARS DOLLARS 
BY REGION 
BY ST 
BY CATEGORY 
BY PRODUCT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF,FONT=ARIAL,$
END

 

This message has been edited. Last edited by: Emily Lee,


WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel
August 03, 2015, 09:36 AM
Avinash
quote:



Hi Lee,

Use EXPANDABLE in Your report.

SET EXPANDABLE=ON
TABLE FILE GGSALES
SUM BUDUNITS UNITS BUDDOLLARS DOLLARS
BY REGION
BY ST
BY CATEGORY
BY PRODUCT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF,FONT=ARIAL,$
END


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
August 05, 2015, 08:07 AM
MartinY
The following does, what I think, but you need to use EXPANDABLE instead of EXPANDBYROW
-* FEX : SAMPLE_SALES
SET EXPANDABLE=ON
TABLE FILE GGSALES
SUM BUDUNITS UNITS BUDDOLLARS DOLLARS 
BY REGION 
BY ST 
BY CATEGORY 
BY PRODUCT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF,FONT=ARIAL,$
TYPE=DATA,
     COLUMN=REGION,
     TARGET='_blank',
     FOCEXEC=sample_sales_drill(RG=REGION ST='ZZ' CAT='ZZ' PRD='ZZ'),
$
TYPE=DATA,
     COLUMN=ST,
     TARGET='_blank',
     FOCEXEC=sample_sales_drill(RG='ZZ' ST=ST CAT='ZZ' PRD='ZZ'),
$
TYPE=DATA,
     COLUMN=BUDUNITS,
     TARGET='_blank',
     FOCEXEC=sample_sales_drill(RG=REGION ST=ST CAT=CATEGORY PRD=PRODUCT),
$
END

-* FEX : SAMPLE_SALES_DRILL
-SET &RG   = IF '&RG.EVAL' EQ 'ZZ' THEN FOC_NONE ELSE '''&RG.EVAL''';
-SET &ST    = IF '&ST.EVAL'  EQ 'ZZ' THEN FOC_NONE ELSE '''&ST.EVAL''';
-SET &CAT = IF '&CAT.EVAL' EQ 'ZZ' THEN FOC_NONE ELSE '''&CAT.EVAL''';
-SET &PRD  = IF '&PRD.EVAL' EQ 'ZZ' THEN FOC_NONE ELSE '''&PRD.EVAL''';

TABLE FILE GGSALES
PRINT UNITS
      DOLLARS
      BUDUNITS
      BUDDOLLARS
BY REGION
BY ST
BY CATEGORY
BY PRODUCT
BY CITY
BY DATE
WHERE REGION   EQ &RG;
WHERE ST       EQ &ST;
WHERE CATEGORY EQ &CAT;
WHERE PRODUCT  EQ &PRD;
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF,FONT=ARIAL,$
END

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


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
August 05, 2015, 08:33 AM
Tony A
If you reduce Martin's example to only the first two BYs, then the drilldown works on the second column with EXPANDBYROW.

Might be the time to raise a case.

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 
August 05, 2015, 09:02 AM
Tony A
In the meantime, there is potential for a cumbersome workaround. Remove the drill down styling for the BY fields and add the following code to Martin's example "sales_sample.fex". Obviously, you'd have to change the various amper variables being passed in the anchor tag to those that meet your enviornment -

DEFINE FILE GGSALES
  REG_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG='||REGION||'&|ST=ZZ&|CAT=ZZ&|PRD=ZZ" target="_blank">'||REGION||'</a>';
  ST_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG=ZZ&|ST='||ST||'&|CAT=ZZ&|PRD=ZZ" target="_blank">'||ST||'</a>';
  CAT_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG=ZZ&|ST=ZZ&|CAT='||CATEGORY||'&|PRD=ZZ" target="_blank">'||CATEGORY||'</a>';
  PRD_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG=ZZ&|ST=ZZ&|CAT=ZZ&|PRD='||PRODUCT||'" target="_blank">'||PRODUCT||'</a>';
END
TABLE FILE GGSALES
SUM BUDUNITS UNITS BUDDOLLARS DOLLARS
BY REG_DRILL AS REGION ROW-TOTAL
BY ST_DRILL  AS ST
BY CAT_DRILL AS CATEGORY
BY PRD_DRILL AS PRODUCT


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 
August 05, 2015, 09:56 AM
Emily Lee
Thanks all for your reply. With EXPANDBYROW=ON, the HTML report is accordion by Row, which automatically display all columns, only aggregate data at row level of the “By” fields. With EXPANDABLE=ON , the report is accordion by Column and row, which do not automatically display all columns. Our requirement is automatically display all columns, only aggregate data at row level, so I can’t use EXPANDABLE=ON.
I did try similar drilldown code same as Martin, but with EXPANDBYROW command, the drilldown code was ignored.

thanks,


WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel
August 05, 2015, 10:41 AM
Tony A
Hi Emily,

Not sure if you picked up what I meant. Try Martin's code but with EXPANDBYROW = ON and using the code I gave above.

At best it will allow you to get what you want and is a workaround.

So just replace Martin's code for sales_sample.fex, with ....
DEFINE FILE GGSALES
  REG_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG='||REGION||'&|ST=ZZ&|CAT=ZZ&|PRD=ZZ" target="_blank">'||REGION||'</a>';
  ST_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG=ZZ&|ST='||ST||'&|CAT=ZZ&|PRD=ZZ" target="_blank">'||ST||'</a>';
  CAT_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG=ZZ&|ST=ZZ&|CAT='||CATEGORY||'&|PRD=ZZ" target="_blank">'||CATEGORY||'</a>';
  PRD_DRILL/A350 = '<a href="/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE&|IBIWF_msgviewer=OFF&|IBIAPP_app=focalpoint'
                 ||'&|IBIF_ex=sample_sales_drill&|CLICKED_ON=&|RG=ZZ&|ST=ZZ&|CAT=ZZ&|PRD='||PRODUCT||'" target="_blank">'||PRODUCT||'</a>';
END
TABLE FILE GGSALES
SUM BUDUNITS UNITS BUDDOLLARS DOLLARS
BY REG_DRILL AS REGION ROW-TOTAL
BY ST_DRILL  AS ST
BY CAT_DRILL AS CATEGORY
BY PRD_DRILL AS PRODUCT
ON TABLE SET HTMLCSS ON
ON TABLE SET EXPANDBYROW ON
ON TABLE SET STYLE *
GRID=OFF,FONT=ARIAL,$
END


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 
August 05, 2015, 04:35 PM
Emily Lee
Tony,
It works. thank you so ... much.

Here is my code:


DEFINE FILE GGSALES
  REG_DRILL/A150 = '<a href="/ibi_apps/WFServlet?IBIF_ex=el_accordion_drilldown&' | 'CLICKED_ON='  |
             '&' | 'RGN='   ||REGION||
             '"  target=_blank">' ||REGION|| '</a>';

  ST_DRILL/A150 = '<a href="/ibi_apps/WFServlet?IBIF_ex=el_accordion_drilldown&' |  'CLICKED_ON='  |
             '&' | 'ST='   ||ST||
             '"  target=_blank">' ||ST|| '</a>';


END

TABLE FILE GGSALES
SUM
     GGSALES.SALES01.BUDUNITS
     GGSALES.SALES01.UNITS
     GGSALES.SALES01.BUDDOLLARS
     GGSALES.SALES01.DOLLARS
BY  LOWEST REG_DRILL
BY  LOWEST ST_DRILL
BY  LOWEST GGSALES.SALES01.CATEGORY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET EXPANDBYROW ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$

ENDSTYLE
END 




  



WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel
August 06, 2015, 04:34 AM
Tony A
Hi Emily,

That's great.

I just try to remember that some functions are merely shortcuts for a large amount of coding so if the supplied function isn't working (bug or otherwise) then I resort to the longhand method Wink

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 
August 06, 2015, 03:00 PM
Emily Lee
Hi Tony,
My test program GGSALE, with your suggestion, was created and tested successfully on Local host project. However, my real project should be on Manager Reporting Server. Both my main program and drilldown program are in same application folder –“vaptmi” of Manager Reporting. Apparently, the path is more complicated in Manager Reporting. I did a simple drilldown test in MRE and get the drilldown URL, modified the path. The result has no error, but it only show the ‘+’ sign of first column, does not show the column value “RGN_DRILL” and the underline hyperlink.
If you have experience with MRE, do you see any possible error in my DEFINE code? We are 7.7.03 on zOS mainframe, HFS.
thanks,
 
DEFINE FILE VAPTSRPT
RGN/A45=VAPTSRPT.VAPTSRPT.RPTG_ROCD || '_' | J0.RPTOFC.RGN_NM || '';
ST/A25=VAPTSRPT.VAPTSRPT.RPTG_ST_CD || '_' | J0.RPTOFC.STNM || '';

RGN_DRILL/A500 = '<a href="/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&' | 'IBIC_server=EDASERVE&' |
'IBIWF_msgviewer=OFF&' | 'IBIAPP_app=vaptmi&&' |      'IBIMR_drill=X,vaptmirt/vaptmirt.htm&' |
		'IBIF_ex=app/oview_gf_s&' | 'CLICKED_ON='  |
             '&' | 'RGN='   ||VAPTSRPT.VAPTSRPT.RPTG_ROCD||
             '&' | 'FREQ='  | '&FREQ'   ||
             '&' | 'RPT_ENDT='| '&RPT_ENDT'      ||
			 '&' | 'ADJ_LVL='  | '&ADJ_LVL'  ||
             '"  target=_blank">' ||RGN|| '</a>';
END
TABLE FILE VAPTSRPT
SUM
     VAPTSRPT.VAPTSRPT.VAPT100_RCPT_CNT
     
BY  LOWEST RGN_DRILL
BY  LOWEST J0.RPTOFC.ST
WHERE ( VAPTSRPT.VAPTSRPT.RPTG_PRD_ENDT EQ '&RPT_ENDT' ) AND ( VAPTSRPT.VAPTSRPT.SMRPTPRD_TYP_CD EQ '&FREQ'  );
ON TABLE SET DROPBLNKLINE ON
ON TABLE SET EXPANDBYROW ON
ON TABLE SUMMARIZE VAPTSRPT.VAPTSRPT.VAPT100_RCPT_CNT AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$


 



WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel
August 07, 2015, 05:50 AM
Tony A
quote:
target=_blank">

Hi Emily,

I think your problem lies in the target declaration - a missing double quote?

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 
August 11, 2015, 03:17 PM
Emily Lee
I got help from IBI Satff. and it works now. :

For MRE, we need to include &IBIMR_drill=X, and domain name (in properties)
here is my code:
RGN_DRILL/A220 = '<a href="/ibi_apps/WFServlet?IBIF_ex=app/oview_gf_s.fex&' || 'CLICKED_ON='  ||
             '&' | 'IBIMR_drill=X' | ',' | 'vaptmirt/vaptmirt.htm' ||
             '&' | 'RGN='   ||RPTG_ROCD||
             '&' | 'FREQ='  | '&FREQ'   ||
             '&' | 'RPT_ENDT='| '&RPT_ENDT'      ||
			 '&' | 'ADJ_LVL='  | '&ADJ_LVL'  ||
             '"  target="graph1">' ||RGN|| '</a>';
  

my domain property is 'vaptmirt/vaptmirt.htm'
the 'graph1' is name of my target frame

thanks.


WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel