Focal Point
[SOLVED]Master reference file

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

November 03, 2014, 01:18 PM
Greg
[SOLVED]Master reference file
There are a ton of reports for one of our departments that ask the same 2 params every time you run them.

Term_Code Aid_Year

Here is the issue. All of the term_codes can only belong to one aid_year.

Ex: term_code 201380 (aug 2013) will always be in aid year 1314. 201410 (jan 2014) will always be in 1314 also.

Can I make some type of include file that figures out the aid_year param for you?

Because of the joins and how the data is, aid_year has to be passed or you do not get the expected results. Mainly 40 years worth of people fat fingering data entry is my guess.

So we need to pass both params, but it seems redundant to have to enter them both.

I could do a chained dynamic pull down for term_code, but I not a big fan of pull downs that have 40 values in them. Like the ones for birth year that take you off the browser sometimes.

I am thinking like a file that has 40 where/then clauses.

WHERE &termcode = '201360' OR '201370' OR '201380' OR '201410' THEN &Aid_year = '1314';

WHERE &termcode = '201260' OR '201270' OR '201280' OR '201310' THEN &Aid_year = '1213';

etc.

Has anyone done anything like this?

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


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

November 03, 2014, 01:32 PM
MartinY
Yes doing an include fex that will assign the &AID_YEAR parameter for you is a solution
-* aid_year_assign.fex
-* Assign aid_year based on &Term_Code
-SET &AID_YEAR = IF &TERM_CODE '201360' OR '201370' OR '201380' OR '201410' THEN '1314'
-           ELSE IF &TERM_CODE '201260' OR '201270' OR '201280' OR '201310' THEN '1213'
-           ELSE '1112';

-* END of aid_year_assign.fex


But it become a static solution.


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
November 03, 2014, 01:38 PM
Greg
Thanks!

So once a year they would have to add a new line for the new aid year. Easy enough if they remember to do it.

I would use chaining so it would be dynamic, but I don't want the huge single select pull down.


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

November 03, 2014, 02:25 PM
MartinY
As far as I understand, the code that I gave you must be used as an -INCLUDE in the fex that produce the report. There is no need to be chained for a drop list. The user just have to select the Term_Code then the Aid_Year will automatically be assigned for the report data extraction.

Am I right when I assume that the user don't need to select the Aid_Year ?


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
November 03, 2014, 05:48 PM
Greg
Yes I ant to pass the param in the background, they will not even know its happening.

I am going to put the 40 or so ELSE IF lines in an include.

There will be 100's of reports that will call this file.


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL