Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

I have created a .fex procedure that was started in designer...


Carter Henderson

Recommended Posts

I have created a .fex procedure that was started in designer but then was modified a lot outside of designer. It runs great when I test it from within the text editor. It also works while Im creating/editing the page. However when I run the webpage, my filters spin and never populate. see the attached pics.

I have many hold files within the procedure so I imagine there is something screwy in there that is causing the problem. Has anyone experienced this and what are some typical causes of something like this

This is in the editing

This is when the page is run

 

Thanks

Link to comment
Share on other sites

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

SET EMBEDHEADING=ON

SET GRAPHDEFAULT=OFF

SET COMPONENT=TableChart_1

SET ARVERSION=2

SET ASNAMES = ON

DEFINE FILE operations/metadata/dm_dashboard/tbl_dm_utilization_weekly_score

KEY/A4 = KEY;

END

-*hold file: miles

-DEFAULTH &WF_SUMMARY=Summary;

-DEFAULTH &WF_TITLE=WebFOCUS Report;

-DEFAULT &DM_FLEET= _FOC_NULL ;

-DEFAULT &TEAM_LEAD = _FOC_NULL ;

-DEFAULT &DM = _FOC_NULL ;

TABLE FILE operations/metadata/dm_dashboard/tbl_dm_utilization_weekly_score

SUM

AVE.ADJUSTED_TOTAL_MILES AS MILES NOPRINT

MAX.LASTDAYOFWEEK

COMPUTE TOTALDM/I2 = CNT.DST.DM;

BY DM_FLEET

RANKED AS MILESRANK BY HIGHEST TOTAL AVE.ADJUSTED_TOTAL_MILES

BY TEAM_LEAD

BY DM

BY KEY

BY 4WEEKAVG

WHERE 4WEEKAVG EQ 1;

WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET EQ &DM_FLEET.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A10,SORT=ASCENDING)).DM_FLEET.;

WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD EQ &TEAM_LEAD.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).TEAM_LEAD.;

WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM EQ &DM.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).DM.;

ON TABLE HOLD AS MI

END

-* END

-* -RUN

-* -EXIT

-*MAX LASTDAYOFWEEKIE THE LAST DATE INCLUDED IN THE REPORT OF THE 4WEEKS *

-*TOTAL DMS BY FLEET

TABLE FILE MI

SUM

TOTALDM

KEY

MAX.LASTDAYOFWEEK

BY DM_FLEET

ON TABLE HOLD AS DMCOUNT_BYFLEET

END

-HOLD FILE: TRAINERS

- -DEFAULT &DM_FLEET = _FOC_NULL ;

-* -DEFAULT &TEAM_LEAD = _FOC_NULL ;

-* -DEFAULT &DM = _FOC_NULL ;

TABLE FILE operations/metadata/dm_dashboard/tbl_dm_utilization_weekly_score

SUM

AVE.TRAINERS AS MILES NOPRINT

BY DM_FLEET

RANKED AS TRAINERRANK BY HIGHEST TOTAL AVE.TRAINERS

BY DM

WHERE 4WEEKAVG EQ 1;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET EQ &DM_FLEET.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A10,SORT=ASCENDING)).DM_FLEET.;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD EQ &TEAM_LEAD.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).TEAM_LEAD.;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM EQ &DM.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).DM.;

ON TABLE HOLD AS TR

END

-HOLD FILE: GRADUATES

- -DEFAULT &DM_FLEET = _FOC_NULL ;

-* -DEFAULT &TEAM_LEAD = _FOC_NULL ;

-* -DEFAULT &DM = _FOC_NULL ;

TABLE FILE operations/metadata/dm_dashboard/tbl_dm_utilization_weekly_score

SUM

AVE.GRADUATES AS MILES NOPRINT

BY DM_FLEET

RANKED AS GRADRANK BY HIGHEST TOTAL AVE.GRADUATES

BY DM

WHERE 4WEEKAVG EQ 1;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET EQ &DM_FLEET.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A10,SORT=ASCENDING)).DM_FLEET.;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD EQ &TEAM_LEAD.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).TEAM_LEAD.;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM EQ &DM.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).DM.;

ON TABLE HOLD AS GR

END

-HOLD FILE: FREED

- -DEFAULT &DM_FLEET = _FOC_NULL ;

-* -DEFAULT &TEAM_LEAD = _FOC_NULL ;

-* -DEFAULT &DM = _FOC_NULL ;

TABLE FILE operations/metadata/dm_dashboard/tbl_dm_utilization_weekly_score

SUM

AVE.FREEDCOUNT AS MILES NOPRINT

BY DM_FLEET

RANKED AS FREEDRANK BY LOWEST TOTAL AVE.FREEDCOUNT

BY DM

WHERE 4WEEKAVG EQ 1;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET EQ &DM_FLEET.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM_FLEET IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A10,SORT=ASCENDING)).DM_FLEET.;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD EQ &TEAM_LEAD.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.TEAM_LEAD IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).TEAM_LEAD.;

-* WHERE TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM EQ &DM.(OR(FIND TBL_DM_UTILIZATION_WEEKLY_SCORE.TBL_DM_UTILIZATION_WEEKLY_SCORE.DM IN OPERATIONS/METADATA/DM_DASHBOARD/TBL_DM_UTILIZATION_WEEKLY_SCORE |FORMAT=A6V,SORT=ASCENDING)).DM.;

ON TABLE HOLD AS FR

END

SET PASS = ALL

JOIN LEFT_OUTER DM IN MI

TO ALL DM IN TR AS J1

END

JOIN LEFT_OUTER DM IN MI

TO ALL DM IN FR AS J2

END

JOIN LEFT_OUTER DM IN MI

TO ALL DM IN GR AS J3

END

JOIN LEFT_OUTER KEY AND DM_FLEET IN MI

TO ALL KEY AND DM_FLEET IN DMCOUNT_BYFLEET AS J4

END

-DEFAULT &DM_FLEET= _FOC_NULL ;

-DEFAULT &TEAM_LEAD = _FOC_NULL ;

-DEFAULT &DM= _FOC_NULL ;

TABLE FILE MI

SUM

MILESRANK

TRAINERRANK

GRADRANK

FREEDRANK

-*LASTDAYOFWEEK

DMCOUNT_BYFLEET.TOTALDM

DMCOUNT_BYFLEET.LASTDAYOFWEEK

-COMPUTE totaldm/I4 = TOT.totaldm;

BY DM_FLEET

RANKED BY LOWEST COMPUTE SCORE/I4= MILESRANK + TRAINERRANK + GRADRANK + FREEDRANK; AS OVERALL_SCORE NOPRINT

BY DM

BY LOWEST COMPUTE SCORE/I4= MILESRANK + TRAINERRANK + GRADRANK + FREEDRANK;

BY TEAM_LEAD

BY KEY

WHERE MI.DM_FLEET EQ &DM_FLEET.(OR(FIND MI.DM_FLEET IN MI |FORMAT=A10,SORT=ASCENDING)).DM_FLEET. ;

WHERE MI.TEAM_LEAD EQ &TEAM_LEAD.(OR(FIND MI.TEAM_LEAD IN MI |FORMAT=A6V,SORT=ASCENDING)).TEAM_LEAD. ;

WHERE MI.DM EQ &DM.(OR(FIND MI.DM IN MI |FORMAT=A6V,SORT=ASCENDING)).DM. ;

ON TABLE HOLD AS FINALTABLE

END

- -EXIT

-* -DEFAULT &DM_FLEET= _FOC_NULL ;

-* -DEFAULT &TEAM_LEAD = _FOC_NULL ;

-* -DEFAULT &DM = _FOC_NULL ;

TABLE FILE FINALTABLE

SUM

MAX.RANK AS MAXRANK

BY KEY

BY DM_FLEET

-* WHERE FINALTABLE.DM_FLEET EQ &DM_FLEET.(OR(FIND FINALTABLE.DM_FLEET IN FINALTABLE |FORMAT=A10,SORT=ASCENDING)).DM_FLEET.;

-* WHERE FINALTABLE.TEAM_LEAD EQ &TEAM_LEAD.(OR(FIND FINALTABLE.TEAM_LEAD IN FINALTABLE |FORMAT=A6V,SORT=ASCENDING)).TEAM_LEAD. ;

-* WHERE FINALTABLE.DM EQ &DM.(OR(FIND FINALTABLE.DM IN FINALTABLE |FORMAT=A6V,SORT=ASCENDING)).DM. ;

ON TABLE HOLD AS MAXRANK

END

-* -EXIT

SET PASS = ALL

JOIN LEFT_OUTER KEY AND DM_FLEET IN FINALTABLE

TO ALL KEY AND DM_FLEET IN MAXRANK AS J5

END

-DEFAULT &DM_FLEET= _FOC_NULL ;

-DEFAULT &TEAM_LEAD = _FOC_NULL ;

-DEFAULT &DM = _FOC_NULL ;

TABLE FILE FINALTABLE

SUM

MILESRANK AS MILES,RANK

TRAINERRANK AS TRAINER ,RANK

GRADRANK AS GRADUATES,RANK

FREEDRANK AS FREED,RANK

BY DM_FLEET AS FLEET

BY LOWEST RANK AS OVERALL,RANK

BY COMPUTE PCTRANK/D10p = E02/MAXRANK; AS PERCENT, RANK -* MAXRANK PER FLEET DIVIDED BY THE RANK OF THE DM

BY DM

BY OVERALL_SCORE AS UTLIZATION, SCORE

WHERE FINALTABLE.DM_FLEET EQ &DM_FLEET.(OR(FIND FINALTABLE.DM_FLEET IN FINALTABLE |FORMAT=A10,SORT=ASCENDING)).DM_FLEET. ;

WHERE FINALTABLE.TEAM_LEAD EQ &TEAM_LEAD.(OR(FIND FINALTABLE.TEAM_LEAD IN FINALTABLE |FORMAT=A6V,SORT=ASCENDING)).TEAM_LEAD. ;

WHERE FINALTABLE.DM EQ &DM.(OR(FIND FINALTABLE.DM IN FINALTABLE |FORMAT=A6V,SORT=ASCENDING)).DM. ;

HEADING

"WK 4 END: <MAX.LASTDAYOFWEEK "

ON TABLE PCHOLD FORMAT AHTML

ON TABLE NOTOTAL

ON TABLE SET CACHELINES 100

ON TABLE SET VZERO OFF

ON TABLE SET POPUPDESC ON

ON TABLE SET BYDISPLAY ON

ON TABLE SET LINES 2000

ON TABLE SET AUTOFIT ON

ON TABLE SET STYLE *

INCLUDE=IBFS:/WFC/Global/Themes/Standard/Default/theme.sty,$

TYPE=REPORT, JUSTIFY=LEFT,GRID=ON, SIZE = 10,COLOR=BLACK, TITLETEXT=Report1, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ARREPORTSIZE=DIMENSION, ARFILTER_TARGET=, ARGRAPHENGINE=JSCHART, $

TYPE= DATA, COLUMN=DM, WRAP = 1, JUSTIFY =LEFT, STYLE=BOLD, $

TYPE= DATA, COLUMN=DM, WHEN = PCTRANK LE .25, COLOR=GREEN, STYLE=BOLD, $

TYPE= DATA, COLUMN=DM, WHEN = PCTRANK LE .50, COLOR=NAVY, STYLE=BOLD, $

TYPE= DATA, COLUMN=DM, WHEN = PCTRANK LE .75, COLOR=MAROON, STYLE=BOLD, $

TYPE= DATA, COLUMN=DM, WHEN = PCTRANK GE .76,COLOR=RED, STYLE=BOLD, $

TYPE=DATA, COLUMN=OVERALL_SCORE, DRILLMENUITEM=WEEKLY DATA ,TARGET= _blank,FOCEXEC= IBFS:/WFC/Repository/Operations/Driver_Manager_Dashboard/Content/Utilization_Score/weekly_data.fex(DM=FINALTABLE.DM), $

- TYPE=DATA, COLUMN=MILESRANK, ALT=MILES,TARGET= CONTENT-KXP72FKS177Z9PQPO4575,FOCEXEC= IBFS:/WFC/Repository/Operations/Driver_Manager_Dashboard/Content/Utilization_Score/4wk_miles_avg.fex(DM=MI.DM), $

-* TYPE=DATA, COLUMN=TRAINERRANK, ALT=TRAINERS, TARGET= CONTENT-KXP73QNO12QIC9FM01395,FOCEXEC= IBFS:/WFC/Repository/Operations/Driver_Manager_Dashboard/Content/Utilization_Score/4wk_trainer_avg.fex(DM=MI.DM), $

-* TYPE=DATA, COLUMN=GRADRANK, ALT=WEEKLY GRADUATES, TARGET= CONTENT-KXP75FRJ1UXVV9XBL2116,FOCEXEC= IBFS:/WFC/Repository/Operations/Driver_Manager_Dashboard/Content/Utilization_Score/4wk_graduates_avg.fex(DM=MI.DM), $

-* TYPE=DATA, COLUMN=FREEDRANK, ALT=WEEKLY FREED, TARG

Link to comment
Share on other sites

Using the F12 may help you figure where is the issue.

Running from the webpage (client) may react differently since the Reporting Server and Client may be invoked/react differently for the same code for severals reasons that I wouldnt be able to explain.

Sometime more validation (code tightening) are performed when running from client.

But what I saw is that you have several places where, from what I see, It should have a -* and its only a - (dash) and where it should not have any dash and have one or two (lines 61, 62, 78, 79, 95, 96, 141, 153, 212).

Also, you have several WHERE clause that are defined as auto-prompting. This may slow down a lot the client (filter spinning) since it has to retreive any possible value for all auto-prompt WHERE clause. And if you have large table, it may be very long to perform.

Finally, you you post sample or code, please use the code tag from the ribbon that looks like </> or type as below (without spaces after & before brackets)

[ code ]

paste your code here

[ /code ]

Try running one part at the time from the client and see where it hang

Link to comment
Share on other sites

In HTML Filter we can use custom fex to load the dropdown. But the page designer always depends on the Reports where condition. I had similar issues when I use dynamic parameter and load the values from the same table. Example Product ID from the details table. instead of using the same details table i always use the master table. it will always have less records and it will load fast. Can you try to change the where condition parameter as Dynamic and edit the parameter and choose the VALUE and DISPLAY value from master table

Also Make sure there is no error in the browser console. run the page and press F12 and check for errors in the console and network for any script error or 404 errors. and turn off the usage analytics in the admin console . it will be enabled by default and send data to ibi server if that server down there will be performance issue

Link to comment
Share on other sites

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...