Focal Point
Month as criteria

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

August 31, 2009, 05:12 PM
Mika Keranen
Month as criteria
Hi,

Just started working with PMF a couple of months ago, with a customer that requires a lot of customizations, so I'd need your help.

The customer would like to have month as a criteria for reports within in PMF. We have the current month and period, previous etc out-of-the box, but how would I use a month selected from a dropdown list as criteria, e.g. January 2009?

If I've understood right, could I achieve this by using ...
-SET &USE_CUR_DT = 'N' ;

...and then I would use the selected month coming in as a parameter. Would this be &TIME?
So, for example I could test this by doing the following...
-SET &TIME = '2006 4 10' ;
(It has all the blanks in between, so each component is 30 chars).

I've tried to make this work, but I'm missing something and I can't put my finger on it. I'm using the default includes (a_defaults, a_scrorecard, pmf_booklet etc), but I'm not getting what I'd need. I'm getting data back, but it is giving me all the data, not just the selected month.

So, my question is, what am I missing? A piece of code that needs to be included and/or a parameter set etc?

Thanks a lot for your help.

Regards,
Mika


WebFOCUS 7.6.x
PMF 5.2.x
August 31, 2009, 06:07 PM
Mika Keranen
An update...

At the moment it seems I got it working, hopefully the right way. Here is what I basically did, in case you happen to notice something that I shouldn't do, please let me know...

1. -SET &USE_CUR_DT = 'N' ;

2. -SET &TIME = 'selected month' ;
Here we have the month with year, quarter and month in the string that is 90 chars long, 30 for each.

3. Set the 3 parameters below.
-SET &TLVL01_CUR = SUBSTR(90,&TIME,1,4,4,'A4') ;
-SET &TLVL02_CUR = SUBSTR(90,&TIME,31,32,1,'A1') ;
-SET &TLVL03_CUR = SUBSTR(90,&TIME,61,63,2,'A2') ;

4. Set some WHERE criteria.
-SET &PMF_BOOKLET_DATA_WH02 =
- 'WHERE (TIME_LEVEL01_VALUE EQ ' | '''' | &TLVL01_CUR | '''' |
- ' AND TIME_LEVEL02_VALUE EQ ' | '''' | &TLVL02_CUR | '''' |
- ' AND TIME_LEVEL03_VALUE EQ ' | '''' | &TLVL03_CUR | '''' | ') ;' ;

5. -INCLUDE PMF_BOOKLET_DATA

6. Create the report from PASS1.

Regards,
Mika


WebFOCUS 7.6.x
PMF 5.2.x
September 01, 2009, 10:13 AM
EricH
Mika,

Which release of PMF are you using?

EricH
September 01, 2009, 10:20 AM
Mika Keranen
Oops,sorry, missed an important piece of information... PMF 512.

Mika


WebFOCUS 7.6.x
PMF 5.2.x