Focal Point
Printing list of reports from dashboard

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

June 19, 2008, 04:43 PM
sosterle
Printing list of reports from dashboard
Is there a way for WebFocus to compile a list of reports that are available on each dashboard, their location and the .fex name?

I'm wanting to just print off a list of what reports are on which dashboards.

Any ideas?


PROD: WebFocus 7.6.9 on WinXP
June 20, 2008, 12:37 AM
Waz
Unless there is an API available, I think you would have to sift through the users personal.xml files to find what you are after.

This I think would only get you reports specifically mentioned in dashboard, not all that are available from the domain.


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!

June 24, 2008, 07:51 PM
JohnB
Hi Shellie,

When you say "dashboards" are you referring to HTML launch pages built with the HTML Layout Painter? If so, are the focexecs embedded in the raunch page or referenced by the launch page?

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
June 30, 2008, 05:51 PM
JohnB
quote:
Originally posted by JohnB:
Hi Shellie,

This little utility I started working on after hours last week for our dept, so good timing for your request.

I created an MFD to enable WebFOCUS to read the .htm file as a datafile, and a focexec to generate a report with the names of all the focexecs embedded in or referenced by that .htm file.

The MFD is:

  
FILENAME=READFILE, SUFFIX=FIX, $
  SEGMENT=ROOT, SEGTYPE=S0, $
    FIELDNAME=LINE, ALIAS=E01, USAGE=A500, ACTUAL=A500, $



The focexec requires you to type in the name of the .htm file including the .htm extension, and the name of the application it resides in. This could be modified to prompt for that, or, ideally, some Dialogue Manager code could be added to loop through all the .htm files in a given application.

 
-* File list_focexecs.fex
-SET &ECHO=ALL;

-SET &FILE_NAME = 'johns_development/non-custodied_assets_dashboard_6-18-08.htm';


APP FILEDEF READFILE DISK &FILE_NAME
-RUN

DEFINE FILE READFILE
    NEW_LINE_1/A500     = TRIM ('L', LINE, 500, '<', 1, 'A500');

    EMBEDDED_FEX/A500   = IF   EDIT (NEW_LINE_1, '9999999999999999') EQ '![CDATA[-* File '
                          THEN TRIM ('L', NEW_LINE_1, 500, '![CDATA[-* File ', 16, 'A500')
                          ELSE 'X';

    TEST/A3             = IF NEW_LINE_1 CONTAINS 'ibif_ex="' THEN 'YES' ELSE 'NO';

    START_POSITION/I3   = IF   TEST EQ 'YES'
                          THEN POSIT (NEW_LINE_1, 500, 'ibif_ex="', 9, 'I3') + 9
                          ELSE 0;

    NEW_LINE_2/A500     = IF   TEST EQ 'YES'
                          THEN SUBSTR (500, NEW_LINE_1, START_POSITION, 500, 500 - START_POSITION, NEW_LINE_2)
                          ELSE 'X';

    END_POSITION/I3     = IF   TEST EQ 'YES'
                          THEN POSIT (NEW_LINE_1, 500, '.fex"', 5, 'I3') + 4
                          ELSE 0;

    REFERENCED_FEX/A500 = IF   START_POSITION NE 0 AND  END_POSITION NE 0
                          THEN SUBSTR (500, NEW_LINE_1, START_POSITION, END_POSITION, END_POSITION - START_POSITION, REFERENCED_FEX)
                          ELSE 'X';

    FOCEXEC_NAME/A500   = IF   EMBEDDED_FEX NE 'X'            THEN EMBEDDED_FEX   ELSE
                          IF   END_POSITION GT START_POSITION THEN REFERENCED_FEX ELSE 'X';

    FOCEXEC_TYPE/A12    = IF   EMBEDDED_FEX NE 'X'            THEN 'Embedded'     ELSE
                          IF   END_POSITION GT START_POSITION THEN 'Referenced'   ELSE 'ERROR';
END


TABLE FILE READFILE
PRINT
     COMPUTE COUNTER/I2 = COUNTER + 1; AS 'Count'
     FOCEXEC_TYPE AS 'Type'
BY FOCEXEC_NAME AS 'Focexec'
HEADING
"Focexec Listing Of"
"&FILE_NAME"
" "
WHERE FOCEXEC_NAME NE 'X';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=DATA,
     COLUMN=N1,
     FONT='ARIAL',
$
TYPE=DATA,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=10,
$
TYPE=DATA,
     COLUMN=N3,
     FONT='ARIAL',
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='ARIAL',
     COLOR='NAVY',
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=10,
     COLOR='NAVY',
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N3,
     FONT='ARIAL',
     COLOR='NAVY',
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=1,
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=12,
     COLOR='NAVY',
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=2,
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=12,
     COLOR='NAVY',
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=2,
     OBJECT=TEXT,
     ITEM=2,
     FONT='ARIAL',
     SIZE=12,
     COLOR='NAVY',
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=3,
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=3,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=12,
     COLOR='NAVY',
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SEQUENCE=2,
$
TYPE=REPORT,
     COLUMN=N2,
     SEQUENCE=1,
$
TYPE=REPORT,
     COLUMN=N3,
     SEQUENCE=3,
$
ENDSTYLE
END

 



This gives a simple report which counts the number of focexecs, provides their names, and whether they are embedded or referenced. Works very nice in our environment.

Regards,

John



WF 7.7.03, Windows 7, HTML, Excel, PDF