Focal Point
[CASE-OPENED] Relatively reference fexes in drilldowns (In the Contents Folder)

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

June 17, 2014, 12:10 PM
J
[CASE-OPENED] Relatively reference fexes in drilldowns (In the Contents Folder)
In WF8, drilldowns and includes reference files by their full path. As shown here you can relatively reference a fex when using an include statement.

Does anyone know how to do this type of thing for drilldowns?
-J

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


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
June 17, 2014, 03:19 PM
J
Let me share 2 scenarios where absolute file referencing can be a nightmare:

You have two directories lets say test and dev. you have a summary and drill down report in test that you copy over to dev. Weird... the report still runs even though there are absolute paths. You make a change to the drilldown fex but nothing happens. Someone wipes out your test directory and now the report doesn't work and you don't know why (it claims it cannot find the file).

This is because the drilldown was pointing to the fex in your test folder, not the one you just copied over.

Another thing that can happen is that you may have permission to your test folder so the report appears to be running fine (even though it is actually hitting a report in the wrong place). You don't think twice about it and put it into production. End users can't run the report but you can and you have no idea why.

The option to reference files relatively or by fully qualified path would be best. This isn't a NFR, we just want relative file referencing back.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
June 20, 2014, 04:20 PM
<Kathryn Henning>
Hi All,

I added this comment to the link in J's comments above but I also wanted to add it here.

Relative pathing is not supported in WebFOCUS 8. While it may work in some scenarios, it won't work in all.

There is a New Feature Request in programming to add the ability to use relative pathing, but it has not yet been implemented.

Currently, only absolute pathing is supported.

Thanks and regards,

Kathryn

This message has been edited. Last edited by: <Kathryn Henning>,
April 27, 2015, 08:14 PM
Moogle
Hi Kathryn,

Relative referencing in a drill-down is desired, for sure. I wonder if you have, or could get, an update on this NFR? I'm at 8.0.09, and would upgrade to 8.1.x if that contained this feature.

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
May 13, 2015, 08:37 PM
<Kathryn Henning>
Hi Joey,

This project is still in programming, so it's not currently in the 8.1.x release.

Cheers!

Kathryn
May 14, 2015, 10:35 AM
Francis Mariani
Here is a workaround - instead of relative reference, use the Content folder full path variable. Here are tested code snippets.

1) Set up the drilldown fex full path based on the parent's fex full path:

&IBIMR_fullpath is a system variable that contains the full path and fex name of the executing fex.

Using the String Replace function, substitute the executing fex name with the drilldown fex name. In this code snippet I use &FOCFEXNAME because it contains the fex name without the full path, but you could also type in the actual fex name instead of using the variable.

I had to add the "FOCEXEC=" code to the &DRILLDOWN_FEX variable because when used later in the code, the variable value was being prefixed by a second "IBFS:/WFC/".

-SET &DRILLDOWN_FEX = STRREP (&IBIMR_fullpath.LENGTH, &IBIMR_fullpath, &FOCFEXNAME.LENGTH, &FOCFEXNAME, 28, 'cfa2_cf_active_bal_drilldown', 500, 'A500');
-SET &DRILLDOWN_FEX = 'FOCEXEC=' || TRUNCATE(&DRILLDOWN_FEX);
-TYPE &DRILLDOWN_FEX


2) In the drilldown style, use the variable.

TYPE=SUBTOTAL, BY=CRNCY, ACROSSCOLUMN=AMOUNT_SC, TARGET=closing_dd,
  &DRILLDOWN_FEX (\
  P_BUS_DTE         = '&P_BUS_DTE' \
  D_TYPE            = 'SUBTOTAL CRNCY' \
  D_PMTDATE         = PMTDATE \
  D_CRNCY           = CRNCY \
  ), $


As explained above, for cleanliness, I wanted to have &DRILLDOWN_FEX only contain the full path and fex name (e.g. "IBFS:/WFC/Repository/testing/specialreports/cfa2_cf_active_bal_drilldown.fex" and then in the drilldown code I wanted FOCEXEC=&DRILLDOWN_FEX but when I did this, I got the second "IBFS:/WFC/" (i.e. "FOCEXEC=IBFS:/WFC/IBFS:/WFC/Repository/testing/specialreports/cfa2_cf_active_bal_drilldown.fex"). Less clean but this works.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server