Focal Point
[CLOSED] Report against user.htm?

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

May 01, 2006, 05:30 PM
Trav
[CLOSED] Report against user.htm?
Anyone out there ever create a procedure or report that would parse the USER.HTM file in managed reporting?

Hoping to not reinvent the wheel -- I've seen a procedure that would parse the basedir and provide some good info, but I'm hoping someone has done the same for the users in managed reporting. There just seems to be a lack of reports -- for auditing purposes, this would be really handy.

Thanks!

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



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
May 01, 2006, 07:20 PM
Piipster
Check out the WebFOCUS Managed Reporting Administrator’s Manual
Version 5 Release 3 Chapter 10.

The MR Extract Utility does extract information from basedir... this includes user information and the groups to which they belong. This is the information that would come from user.htm.

There are also master files for the extracted data and a couple of sample procedures.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
August 28, 2006, 12:11 PM
Trav
I know it's been awhile, but I finally spent some time on this and came up with something simple that works...

Here is a sample master file that you can point at your USER.HTM file. This will allow you to write reports against the file so you can run reports directly from your MRE user repository.
$ MREUSERS

FILE=MREUSERS, SUFFIX=FIX, $
DATASET='c:\ibi\WebFOCUS71\basedir\user.htm'
$-- Change the above line to point to the user.htm file on your server

SEGNAME=MRE_LINE, SEGTYPE=S0, $
  FIELD=MRE_LINE, MRE_LINE, A200, A200, MISSING=OFF ,$
$

$-- Determine the line type
DEFINE MRE_LINE_TYPE/A10 =
  IF MRE_LINE CONTAINS 'HTML>' OR 'HEAD>' OR 'TITLE>' OR 'BODY>'  OR 'FONT>'  OR '<P>'  THEN 'HTMLTAG' ELSE
  IF MRE_LINE CONTAINS '<!--' THEN 'COMMENT' ELSE
  IF MRE_LINE CONTAINS 'ROLE=''#' THEN 'USER' ELSE
  'LINE';
$
$-- Determine User Name
DEFINE CLOSE_BRACKET/I2 = POSIT(MRE_LINE, 200, '>', 1, 'I2') + 1;
DEFINE OPEN_BRACKET/I2 = POSIT(SUBSTR(200, MRE_LINE, CLOSE_BRACKET, 200, 200, 'A200'), 200, '<', 1, 'I2') - 2;
DEFINE MRE_USERNAME/A60 = SUBSTR(200, MRE_LINE, CLOSE_BRACKET, CLOSE_BRACKET+OPEN_BRACKET, 60, 'A60');
$
$-- Determine User ID
DEFINE USERID_START/I2 = POSIT(MRE_LINE, 200, 'NAME=', 5, 'I2') + 6;
DEFINE USERID_END/I2 = POSIT(SUBSTR(200, MRE_LINE, USERID_START, 200, 200, 'A200'), 200, '''', 1, 'I2') - 1;
DEFINE MRE_USERID/A10 = UPCASE(10, SUBSTR(200, MRE_LINE, USERID_START, USERID_START+USERID_END, USERID_END, 'A10'), 'A10');
$
$-- Determine Role
DEFINE ROLE_START/I2 = POSIT(MRE_LINE, 200, 'ROLE=''#', 7, 'I2') + 7;
DEFINE MRE_ROLE/A60 = SUBSTR(200, MRE_LINE, ROLE_START, CLOSE_BRACKET-3, 60, 'A60');
$
$-- Determine Email
DEFINE EMAIL_START/I2 = POSIT(MRE_LINE, 200, 'email=', 6, 'I2') + 6;
DEFINE MRE_EMAIL/A60 = IF EMAIL_START EQ 6 THEN '' ELSE SUBSTR(200, MRE_LINE, EMAIL_START, ROLE_START-10, 60, 'A60');
$


Please note that this master file is VERY simple in that it really only evaluates one "MRE_LINE_TYPE". The file could probably be further enhanced to look at domains, groups, etc. and be a little more robust to only create the defines on the appropriate lines.


So, as an example, you can now write a report against the master that will tell you what users you have set up in MRE. This sample report will show you the full list by USERID and prints the full user name, Role, and Email address.

TABLE FILE MREUSERS
BY MRE_USERID
PRINT   MRE_USERNAME
        MRE_ROLE
        MRE_EMAIL
WHERE MRE_LINE_TYPE EQ 'USER';
-*WHERE MRE_USERID EQ '&IBIMR_user';
END


You'll also see in the above example that I have commented out a line of code that would give you the information specifically for the logged-in user (since I've defined &IBIMR_user previously). So you could go so far as to create a specific greeting for users and welcome them into your reports/dashboard using their full user name that you've defined in MRE for example. Obviously there are a lot of possibilities here.

Hope this is useful!



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
August 28, 2006, 04:28 PM
Francis Mariani
Trav,

Thanks for the user.htm Master. I will add it to my MRE reporting arsenal.

Cheers,

Ffancis.


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
August 28, 2006, 05:30 PM
Trav
I should be thanking you -- it was your MREBASEDIR master that I used as a guide. Smiler



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
July 03, 2008, 04:51 PM
Laure
Not wanting to reinvent the wheel.
Has anyone written a master against user specific .htm files found in the basedir?

userid.htm is the format of the file name.
I'm looking for a means to building HTML links for SAVED PARAMETER REPORTS without using a Domain Tree since the Domain Tree display way too many folders -even if the folder has nothing to display to the user.

Thanks.


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
June 07, 2010, 08:37 AM
bobjackson
I used Francis' suggestion (original solution from Trav) a few months ago and it works really well.
Our client/MRE is on a different machine from our reporting server(s) so we just copy user.htm every night and are no more than 24 hours out of date.


WebFocus 7.6.11
IBM iSeries