Want to add the ability to track the usage of reports on our public dashboards. If a user runs a report from MRE or Dev Studio I don't want to include that data.
After doing some searching the approach would be to have a -INCLUDE in the reports that would modify a database that contained the parameters selected, date/time info, etc.
Is there a way to get the dashboard name from a variable? (ex. aa_mpv) So that I can include that information in the database.This message has been edited. Last edited by: Kerry,
This is what was suggested to me by Tech Support. Fairly obvious, though I cannot find documentation.
What I've found so far:
- It works on Public Views, though only when a fex is run from the domain tree. If a fex is run from a block, the variable is blank.
I will now try this from a Group View.
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
October 19, 2009, 10:05 AM
Francis Mariani
The same for Group Views - it works only when a fex is run from the domain tree. If a fex is run from a block, the variable is blank.
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
October 20, 2009, 08:52 AM
dlogan
Just to see if something would trigger WORP_MPV prior to the main content block on a page loading, I tried the following in "Custom Settings" (site.wfs) and played around with this a bit.
If I launched the right other things first, this does carry the right value. However it does not ALWAYS carry the right value which could cause issues.
I'm having a bit of trouble understanding this code.
1) What does httpsession=_MPV do, and is this documented anywhere? 2) How does the variable MYWORPMPV exist in the ELSE clause when it is not set?
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
October 20, 2009, 10:01 AM
<JG>
quote:
httpsession=_MPV
httpsession and WORP_MPV are in the security docs
_MPV is the header variable that is passed (I believe)
October 20, 2009, 10:17 AM
dlogan
To step through the code:
If the WebFOCUS Variable "WORP_MPV" is defined, then continue. Otherwise go to the "ELSE" statement.
<IFDEF> WORP_MPV
Define the name of the Session variable that you want to save into the session. The variable it is stored into (httpsession) could really be any name, as long as the same name is used in the call. I chose httpsession, because it makes sense for what the variable is a representation of.
httpsession=_MPV
Take the WebFOCUS Variable WORP_MPV and store the value of that variable into the session variable name stored within httpsession (e.g. _MPV).
This routine "CopyWFVarToSessionVar" is documented in the Security and Administration manual.
Store the value of the WebFOCUS Variable WORP_MPV into a new WebFOCUS Variable I am creating "MYWORPMPV"
MYWORPMPV=&WORP_MPV
If the WebFOCUS Variable WORP_MPV is not defined, then this code block is executed.
<ELSE>
Set the name of the WebFOCUS variable that you want the value of the session variable to go into.
In this case we're using the same WebFOCUS Variable name I created before "MYWORPMPV"
wfvar=MYWORPMPV
Store the name of the session variable that you want to retrieve the value from into the variable "httpsession".
Again, the name used here could have been something other than "httpsession" as long as that same variable is used in the call.
httpsession=_MPV
Take the value of the session variable with the name stored into "httpsession", and put that value into the WebFOCUS Variable with the name stored into wfvar.
<call> CopySessionVarToWFVar(httpsession,wfvar)
End the "IF" statement
<ENDIF>
Pass the two variables (one created, one builtin), to the Reporting Server so they are available for reports.
_MPV could really be anything as well, just as long as it was the same thing within both sections of the IF statement.
In one section I'm saying, "If the variable WORP_MPV exists, I want to save it into the session to use it later".
The other section states, "If WORP_MPV doesn't exist, I want to try to see if I can get it out of the session".
The variable _MPV could have been anything, just as long as I was storing into the session the same variable name I was later trying to pull out of the session.
Oh, and no, _MPV is not an HTTP Header variable, but the session variable name. There are similar calls to get an HTTP Header variable and store it into a WebFOCUS variable, but that is not what I'm doing here.
All of these calls are documented in the Security and Administratio manual.
My explanation lacked your clarity (by a long way), I did not read your code closely enough and missed the reassignment.
October 20, 2009, 11:42 AM
Francis Mariani
Doug,
Thanks for the detailed info. I will spend a bit more time with code you've posted.
Unfortunately, since it doesn't work consistently, this will not resolve the request to have the view name available to a fex running in BID. I am waiting for feedback from Tech Support but I'm not hopeful. It seems rather ridiculous this isn't built-in and a new feature request will have to be made...
Thank you,
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
October 21, 2009, 12:42 PM
Francis Mariani
Someone at I.B. Tech Support worked really hard on this!
The solution is provided in a zip file attached to Tech Support case 52862534.
It involves:
- creating and compiling a new java class; - modifying site.wfs to call said class; - modifying a General Configuration in the Client Admin Console to activate the class;
I'll give this a try and update this thread.
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
October 21, 2009, 01:26 PM
dlogan
Francis, I took a look at the case. That is some neat stuff. It looks like they're extending the default WebFOCUS Exit class so that a new method is available within the site.wfs logic in order that the WORP_MPV value can be pulled directly from the session.
Definitely some cool stuff, yet not that terribly complex.
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
February 04, 2014, 04:16 PM
Francis Mariani
After several hours of coding and debugging I’ve come to the realization that this just won’t work.
The BID View ID parameter set in site.wfs just isn’t reliable. Sometimes it does get passed, with values like “af_gbv” or “ao_gbv”), but often the value is “null”. Also, if you leave the dashboard alone for a while, then click on an hyperlink to run a report, the parameters have expired, so you no longer can determine the View.
Very discouraging. I originally opened a case in 2009, WF v7.6.5. Here we are, a few years older, a few versions newer and I still cannot get the View ID - a real shame.
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