Focal Point
[CLOSED] Number of user hits on report

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

August 31, 2010, 08:57 PM
<ABHINAV BALI>
[CLOSED] Number of user hits on report
Hi,

I want to create a report which can give me information as which user has run which report and number of hits or number of times user has run the report along with timestamp.

so , for example:

userid, reportname, hits,timestamp

Does anyone has done similar before?

Thanks
Abhi

This message has been edited. Last edited by: Kerry,
August 31, 2010, 09:05 PM
Waz
This has been asked before, and from memory, several answers were given.

We here have a fex included, effectivly in each report that writes the required info, who/what/when, into a db, that can then be reported on.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

September 01, 2010, 09:04 AM
jgelona
Here's the fex we use:
-* File outcmusr.fex
 FILEDEF OUTCMUSR DISK &&BASEAPP..outcmusr.txt ( LRECL 80 RECFM V APPEND
-RUN
-SET &NOW=HHMMSS('A8');
-SET &DTLPGM=EDIT(&FOCFOCEXEC,'$99999999');
-WRITE OUTCMUSR &DATEYYMD &NOW &DTLPGM &OUTPUT &RUSER &&STAFF_NAME
-RUN


We just do a -INCLUDE of this program wherever we need it. Obviously those items that are not system variables (&RUSER, &&STAFF_NAME and &OUTPUT) have to be established prior to the -INCLUDE.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
September 01, 2010, 09:40 AM
Tony A
Of course, the downside of appending a file is thta if two users try to update the file at precisely the same time, there is a chance of one of the updates not being performed.

You'd be better off creating a FOCUS DB on a sync machine or using an RDBMS like MS SQL for your repository.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 01, 2010, 10:02 AM
GamP
An example of what T proposes is what I use at one of my clients:
-SET &RUSER = UPCASE(8, &RUSER, 'A8');
SQL SQLMSS
INSERT INTO DBO.DS_LOG ( FEX_NAME,  USER_ID,  SERVER_ID,  LOG_DATE, LOG_TIME )
                VALUES ( '&WEBRPC', '&RUSER', '&&SERVER', '&YYMD',  '&TOD'   );
END
SQL SQLMSS
COMMIT;
END

&WEBRPC contains the name of the fex which is being set in the report or maintain itself. &&SERVER is being set in the edasprof.prf.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 01, 2010, 05:52 PM
Waz
What ever the destination of the info, there is a level of infrastructure that needs to be put in place.

My suggestionnis to have one generic fex that is included in all fexes, and this one can then include any other peices of code that needs to be set for all fexes.

An example of this would be stats gathering, and generic constants.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

September 02, 2010, 08:48 AM
Max W
You can have a sink machine process that writes to a database, but instead of -INCLUDing the code in each focexec, you can insert a run entry into DEFAULT.WFS before the target focexec is executed. In this way, you can also have a piece that runs after the focexec that can capture the run time into the same usage auditing database via the sink machine. The nice part about this approach is that the usage database can also accommodate a record of run parameters or other relevant statistics.


Max...

Production: WebFOCUS 7.67, ArcIMS 9.1, MRE, BID
Test: WebFOCUS 7.67, ArcIMS 9.1
Platform: Win 2003
September 02, 2010, 01:58 PM
GCohen
If you have purchased the WebFOCUS Pro Server you already have a component called "Resource Analyser". Just turn it on and you get all kinds of reports about who is using what and when. Plus you can do your own reports from the data file of all usage that is kept.


Release 7.6.9
Windows
HTML