Focal Point
Include statement for operational report

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

June 25, 2009, 10:44 AM
SethW
Include statement for operational report
We are trying to write a custom 'measure detail' 'operational report...' which uses passed parameters.

I am trying to cobble together the correct include statements section at the top of the operational report fex to capture all of the passed parameters.

First we looked at the PMF 5 manual on p. 289. Then we looked at the values output from ctest.fex (displays browser cookie values). Finally I looked at the include statement in pmf_form.fex (Analysis Designer). All three were give different answers.

I seem to remember that include statement in the manual is from an older version of PMF and may have to be updated to reflect the current version.

Would anyone be able to post the include section of one of their operational report fexes that captures the passed parameters for PMF version 5 so that we can make sure we are capturing parameters correctly?


Thanks in advance.

-Seth


WF 7.65. Solaris. PMF 5.11 on Oracle 10g
June 25, 2009, 10:57 AM
Bob Jude Ferrante
The newer INCLUDE is GADG_DIM_PARMS_MULT which makes it easier if you're doing multiple dimensions. The original one, GADG_DIM_PARMS, was a little more tedious to use, because it only handled parms for one dim at a time. You can use GADG_DIM_PARMS_MULT always, even if you want to pass the parms from just one dimension.

GADG_DIM_PARMS_MULT handles multiple dimensions in one pass. That’s why there’s an 01, 02, etc after the dim name parameters you’re passing (see Example below). So use that one even if you’re trying to get parms for only one dimension, just so you get used to using it.

Please make sure to include A_DEFAULTS and A_SCORECARD at the top of your operational report. These make sure all base ampers are populated right, and also identify the high level Scorecard filter. If those are missing then neither GADG_DIM_PARMS_MULT nor GADG_DIM_PARMS will work. If your operational report is dealing with perspectives or objectives, there are additional includes you can use to make your life easier. Let me know if you need those.

What you get out will be amper vars [dimension_name]_LEVELnn_VALUE that represent the dimension filter broken out to more easily work when doing a WHERE against the separate hierarchy fields in your report (e.g., what you might have as BY fields, or which might be “top level” filters you aren’t even showing).

Example. If you were doing two dimensions (LOCATION and PRODUCT) you’d have code like this:

  
-INCLUDE A_DEFAULTS 
-INCLUDE A_SCORECARD
...
-SET &GADG_DIM_NAME01 = 'LOCATION' ;
-SET &GADG_DIM_NAME02 = 'PRODUCT ;
-INCLUDE GADG_DIM_PARMS_MULT
-SET &MYREGION  = IF &LOCATION_LEVEL01_VALUE NE ‘ ‘ THEN TRUNCATE(&LOCATION_LEVEL01_VALUE) ELSE 'ALL' ;
-SET &WAREHOUSE = IF &LOCATION_LEVEL02_VALUE NE ‘ ‘ THEN TRUNCATE(&LOCATION_LEVEL02_VALUE) ELSE 'ALL' ;
-SET &PROD_TYPE = IF &PRODUCT_LEVEL01_VALUE NE ‘ ‘  THEN TRUNCATE(&PRODUCT_LEVEL01_VALUE)  ELSE 'ALL' ;
-SET &PROD_NAME = IF &PRODUCT_LEVEL02_VALUE NE ‘ ‘  THEN TRUNCATE(&PRODUCT_LEVEL02_VALUE)  ELSE 'ALL' ;
...
TABLE FILE YOURDATASOURCE
...
WHERE MYREGION  EQ &MYREGION.QUOTEDSTRING ;
WHERE WAREHOUSE EQ &WAREHOUSE.QUOTEDSTRING ;
WHERE PROD_TYPE EQ &PROD_TYPE.QUOTEDSTRING ;
WHERE PROD_NAME EQ &PROD_NAME.QUOTEDSTRING ;


This is assuming you want to use the top two levels of LOCATION and the top two levels of PRODUCT as your filters. You can pass in as many levels as you need. You don't have to pass levels in numeric sequence if you don't want.

In the -SETs, you might want to set up a default value other than blank if the variable ends up not being populated for some reason (e.g., if a particular report from which you're drilling might or might not include the dimension context); I put code into the example where if the value is blank it gets set to 'ALL', but you can take it out if you just want the value to be blank.

A tip: If you don't test for blanks, you could end up passing a filter like WHERE REGION EQ ' ' in which case you might get no return, which is probably not what you'd want. So you can put in Dialogue Manager code to test the value and skip over the WHERE statement if the value is 'ALL' or blank if you want.

We'll double-check the current doc to make sure it's up to date.

thanks

This message has been edited. Last edited by: Bob Jude Ferrante,


Bob Jude Ferrante
Director of Business and Development
WebFOCUS Performance Management
Bob_Ferrante@ibi.com
917-339-5105

I'll take any questions about PMF - business or technical - anytime!