Jump to content

How to create Cascading filter in WebFOCUS Designer? I used below code but didn't work. Thank you in advance!


Recommended Posts

Posted

ENGINE INT CACHE SET ON

SET PAGE-NUM=NOLEAD

SET SQUEEZE=ON

-DEFAULTH &WF_HTMLENCODE=ON;

SET HTMLENCODE=&WF_HTMLENCODE

SET HTMLCSS=ON

-DEFAULTH &WF_EMPTYREPORT=ON;

SET EMPTYREPORT=&WF_EMPTYREPORT

-DEFAULTH &WF_SUMMARY='Summary';

-DEFAULTH &WF_TITLE='WebFOCUS Report';

TABLE FILE WF_RETAIL

SUM WF_RETAIL.WF_RETAIL_SALES.COGS_US

WF_RETAIL.WF_RETAIL_SALES.GROSS_PROFIT_US

WF_RETAIL.WF_RETAIL_SALES.REVENUE_US

BY WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY

BY WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG

BY WF_RETAIL.WF_RETAIL_PRODUCT.MODEL

WHERE WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY EQ &PRODUCT_CATEGORY.(OR(FIND WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY IN WF_RETAIL |FORMAT=A40V,SORT=ASCENDING)).Product Category:.;

WHERE WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG EQ &PRODUCT_SUBCATEG.(OR(FIND WF_RETAIL.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG IN WF_RETAIL |FORMAT=A50V,SORT=ASCENDING ,WITHIN=PRODUCT_CATEGORY)).Product Subcategory:.;

WHERE WF_RETAIL.WF_RETAIL_PRODUCT.MODEL EQ &MODEL.(OR(FIND WF_RETAIL.WF_RETAIL_PRODUCT.MODEL IN WF_RETAIL |FORMAT=A50V,SORT=ASCENDING ,WITHIN=PRODUCT_SUBCATEG)).Product Model:.;

ON TABLE PCHOLD FORMAT HTML

ON TABLE NOTOTAL

ON TABLE SET CACHELINES 100

ON TABLE SET GRWIDTH 1

ON TABLE SET STYLE *

INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$

TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $

ENDSTYLE

END

-RUN

Posted

Try

WHERE wf_retail.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY EQ &DF_WH_PRODUCT_CATEGORY.(OR(FIND wf_retail.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY IN retail_samples/wf_retail |FORMAT=A40V,COMPARATOR=EQ,SORT=ASCENDING,FIELDNAME=wf_retail.WF_RETAIL_PRODUCT.PRODUCT_CATEGORY)).Produkt Kategorie.;

WHERE wf_retail.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG EQ &DF_WH_PRODUCT_SUBCATEG.(OR(FIND wf_retail.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG IN retail_samples/wf_retail |FORMAT=A50V,COMPARATOR=EQ,SORT=ASCENDING,FIELDNAME=wf_retail.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG,WITHIN=DF_WH_PRODUCT_CATEGORY)).Produkt Unterkategorie.;

Posted

Thank you so much for the reply, Patrick. It is working report level, but not for dashboard. I am attaching the screenshot (left side is report level & Right side of the screenshot is Dashboard).image.thumb.png.a8e956d9344ce1a0f5effd38b8277093.png

Posted

I asked because you showed an image comparing the run for the report level to the run for the Designer level. But that image looks different than what you would get from runninng the code you poasted.

Your code for the wf_retail example works fine for me in Designer 9.1.0, but not for you in 9.2.0. That seems like a bug and you would open a case with ibi.

Here is the simpest example I could come up with based on the car file. Does it work in Designer for you?

TABLE FILE CARPRINT LENGTH BY COUNTRY BY CAR WHERE COUNTRY EQ '&COUNTRY.(FIND COUNTRY IN CAR).'WHERE CAR EQ '&CAR.(FIND CAR IN CAR| WITHIN=COUNTRY).'END

And the list gets filtered in Designer:

image.thumb.png.d5cf2f63b99efd7cf9b0de59c14ca0c2.png 

Posted

As far as know, the chaining can be accomplished by coding the WITHIN keywords in the variable, as you have done in your example.

I think the hierarchy in the Master file is for use by GUI tools to write code to do the chaining.

Posted

Patrick, I see what you mean. I am not seeing this for my existing dashboard, but when i recreate the dashboard i am able to see the link between Region and Office name. Attaching the screenshots below. Thank you so much for helping me.image.png.161da052cfc1cbd5d568e2acd0b084c4.png image.png.aad6dd6e45b998fb415872dd5bb25856.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...