Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] how to list reports in a dashboard block

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] how to list reports in a dashboard block
 Login/Join
 
Platinum Member
posted
Hi

This is similar to my previous post regarding listing domains.

Now I am trying to list all of the reports under a certain folder.

You guys might like this... The following works perfectly...

http://myserver/ibi_apps/Controller;jsessionid=xxx?WORP_MPV=xxx&
WORP_REQUEST_TYPE=worp_folder&isShared=false&WORP_CURRENT_DOMAIN_TITLE=xxx&
WORP_FOLDER_TITLE=xxx&parent=xxx&IBIMR_sub_action=MR_STD_REPORT&
IBIMR_domain=xxx&IBIMR_folder=xxx&IBIMR_flags=

where xxx is replaced by the actual values of course (jsessionid is in a cookie).

This is very useful and as I said, does in fact return the list of reports.

However, I have no control at all as to how the report list is displayed. It is obviously controlled by "ibi_apps/controller".
I want to get the report list back as xml or some other format and then parse the list and display the items myself. So I can control the actual appearance (the style) of the list.

How can I get the report list in some kind of recordset? Is there a master file somewhere that lists the reports? Should I try and read the HTML file in basedir that contains all of the info (what a hassle that would be).

Thanks

Jodye

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


WF 8.0.0.5M
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Report This Post
Expert
posted Hide Post
I did not know about the WORP_REQUEST call, very interesting.

My approach would be to read the BASEDIR HTML file and control the output myself.

I have created what I think is a decent Master file for the BASEDIR HTML file and a FEX that reads it to display a list of programs with the MRE parameters by folder. One flaw is that a folder created within a folder is not depicted in my report.

Master:

$-------------------------------------------------------------------------------
$ Module Name : mrebasedir.mas
$ Description : Master to describe the contents of a BASEDIR HTML file
$ Developed by : Francis Mariani - Francis Mariani Inc.
$ Date Developed: April 2006
$-------------------------------------------------------------------------------
$ Maintenance History
$-------------------------------------------------------------------------------
$ Modified by :
$ Date Modified :
$ Reason :
$ Change ID :
$-------------------------------------------------------------------------------

FILE=MREBASEDIR, SUFFIX=FIX, $

SEGNAME=MRE_LINE, SEGTYPE=S0, $
FIELD=MRE_LINE, MRE_LINE, A200, A200, MISSING=OFF ,$
$
DEFINE x_LINE_EDIT1/A200 = CTRAN(200, MRE_LINE, BYTVAL('<','I3'), BYTVAL('[','I3'), 'A200');
DEFINE x_LINE_EDIT/A200 = CTRAN(200, x_LINE_EDIT1, BYTVAL('>','I3'), BYTVAL(']','I3'), 'A200');
DEFINE MRE_LINE_TYPE/A10 =
IF MRE_LINE EQ '' THEN 'BLANK' ELSE
IF MRE_LINE CONTAINS '<!--' THEN 'COMMENT' ELSE
IF MRE_LINE CONTAINS 'HTML>' OR 'HEAD>' OR 'BODY>' OR 'FONT>' OR '<P>' THEN 'HTMLTAG' ELSE
IF MRE_LINE CONTAINS '<TITLE>' THEN 'TITLE' ELSE
IF MRE_LINE CONTAINS '.kmd' OR 'app/help.htm' THEN 'MISC' ELSE
IF MRE_LINE CONTAINS '<A HREF=''#' THEN 'FOLDER' ELSE
IF MRE_LINE CONTAINS '.fex' THEN 'FEX' ELSE
IF MRE_LINE CONTAINS '.htm' THEN 'HTML' ELSE
'LINE';
$
$-- Determine Folder attributes
DEFINE x_FOLDER_ID/A13 = SUBSTR(200, MRE_LINE, 10, 22, 13, 'A13');
DEFINE x_FONMS/I4 = POSIT(MRE_LINE, 200, '>', 1, 'I4') + 1;
DEFINE x_FONME/I4 = POSIT(MRE_LINE, 200, '</A>', 4, 'I4') - 1;
DEFINE x_FOLDER_NM/A100 = SUBSTR(200, MRE_LINE, x_FONMS, x_FONME, 100, 'A100');

DEFINE x_FOLDER_IDY/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_ID ELSE '';
DEFINE x_FOLDER_NMY/A100 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_NM ELSE '';

DEFINE MRE_FOLDER_ID/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_IDY ELSE MRE_FOLDER_ID;
DEFINE MRE_FOLDER_NM/A100 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_NMY ELSE MRE_FOLDER_NM;

$-- Determine Parent folder if folder is a subfolder
DEFINE x_PFONMS/I4 = POSIT(MRE_LINE, 200, 'belongsto=', 10, 'I4') + 10;
DEFINE x_PFONME/I4 = POSIT(MRE_LINE, 200, '>', 1, 'I4') - 1;
DEFINE x_PFOLDER_IDX/A13 = SUBSTR(200, MRE_LINE, x_PFONMS, x_PFONME, 13, 'A13');
DEFINE x_PFOLDER_IDY/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_PFOLDER_IDX ELSE '';
DEFINE x_PFOLDER_IDZ/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_PFOLDER_IDY ELSE x_PFOLDER_IDZ;
DEFINE MRE_PFOLDER_ID/A13 = IF x_PFOLDER_IDZ EQ MRE_FOLDER_ID THEN '' ELSE x_PFOLDER_IDZ;

DEFINE MRE_FOLDER_PATH/A30 = IF MRE_PFOLDER_ID EQ '' THEN MRE_FOLDER_ID ELSE MRE_PFOLDER_ID || (' > ' | MRE_FOLDER_ID);

DEFINE MRE_FOLDER_NN/A150 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_NMY || (' (' | MRE_FOLDER_PATH || ')') ELSE MRE_FOLDER_NN;
$
$-- Determine FEX attributes
DEFINE x_FXS/I4 = POSIT(MRE_LINE, 200, 'app/', 4, 'I4') + 4;
DEFINE x_FXE/I4 = POSIT(MRE_LINE, 200, '.fex', 4, 'I4') + 3;
DEFINE x_FXL = x_FXE - x_FXS + 1;
DEFINE x_FEX_ID/A12 = SUBSTR(200, MRE_LINE, x_FXS, x_FXE, x_FXL, 'A12');
DEFINE x_FXNMS/I4 = POSIT(MRE_LINE, 200, '''>', 2, 'I4') + 2;
DEFINE x_FXNME/I4 = POSIT(MRE_LINE, 200, '</A>', 4, 'I4') - 1;
DEFINE x_FXNML = x_FXNME - x_FXNMS + 1;
DEFINE x_FEX_NM/A100 = SUBSTR(200, MRE_LINE, x_FXNMS, x_FXNME, x_FXNML, 'A100');

DEFINE MRE_FEX_ID/A12 = IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_ID ELSE '';
DEFINE MRE_FEX_NM/A100 = IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_NM ELSE '';
$
$-- Determine HTML attributes
DEFINE x_HTS/I4 = POSIT(MRE_LINE, 200, 'A HREF=', 4, 'I4') + 8;
DEFINE x_HTE/I4 = POSIT(MRE_LINE, 200, ' MRFLAG', 4, 'I4') - 2;
DEFINE x_HTL = x_HTE - x_HTS + 1;
DEFINE x_HTML_URL/A100 = SUBSTR(200, MRE_LINE, x_HTS, x_HTE, x_HTL, 'A100');
DEFINE x_HTMNS/I4 = POSIT(MRE_LINE, 200, '''>', 2, 'I4') + 2;
DEFINE x_HTMNE/I4 = POSIT(MRE_LINE, 200, '</A>', 4, 'I4') - 1;
DEFINE x_HTMNL = x_HTMNE - x_HTMNS + 1;
DEFINE x_HTML_NM/A100 = SUBSTR(200, MRE_LINE, x_HTMNS, x_HTMNE, x_HTMNL, 'A60');
$
$-- Determine Program attributes
DEFINE MRE_PROG_ID/A100 =
IF MRE_LINE_TYPE EQ 'HTML' THEN x_HTML_URL ELSE
IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_ID ELSE '';
TITLE='Program ID', $
DEFINE MRE_PROG_NM/A100 =
IF MRE_LINE_TYPE EQ 'HTML' THEN x_HTML_NM ELSE
IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_NM ELSE '';
TITLE='Program Name', $
DEFINE MRE_PROG_NN/A220 =
IF MRE_LINE_TYPE EQ 'HTML' THEN x_HTML_URL || (' - ') | x_HTML_NM ELSE
IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_ID || (' - ') | x_FEX_NM ELSE '';
TITLE='Program', $

$
$-- Determine Domain name
DEFINE x_TTS/I4 = POSIT(MRE_LINE, 200, '<TITLE>', 7, 'I4') + 7;
DEFINE x_TTE/I4 = POSIT(MRE_LINE, 200, '</TITLE>', 8, 'I4') - 1;
DEFINE x_TTL = x_TTE - x_TTS + 1;
DEFINE x_TITLEX/A100 = SUBSTR(200, MRE_LINE, x_TTS, x_TTE, x_TTL, 'A100');

DEFINE MRE_TITLE/A100 = IF MRE_LINE_TYPE EQ 'TITLE' THEN x_TITLEX ELSE MRE_TITLE;

$
$-- Determine MRE parameters
DEFINE x_PMS/I4 = POSIT(MRE_LINE, 200, 'MRFLAG=', 7, 'I4') + 8;
DEFINE x_PME/I4 = POSIT(MRE_LINE, 200, '''>', 2, 'I4') - 1;
DEFINE x_PML = x_PME - x_PMS + 1;
DEFINE x_PARMS/A60 = SUBSTR(200, MRE_LINE, x_PMS, x_PME, x_PML, 'A60');

DEFINE MRE_PARMS_PP/A3 = IF x_PARMS CONTAINS 'skipamper' THEN 'No' ELSE 'Yes';
TITLE='Prompt for,Parameters', $
DEFINE MRE_PARMS_SU/A3 = IF x_PARMS CONTAINS 'hidden' THEN 'No' ELSE 'Yes';
TITLE='Show on,User List', $
DEFINE MRE_PARMS_DF/A3 = IF x_PARMS CONTAINS 'defer' THEN 'Yes' ELSE 'No';
TITLE='Only run,Deferred', $
DEFINE MRE_PARMS_OL/A3 = IF x_PARMS CONTAINS 'runasolap' THEN 'Yes' ELSE 'No';
TITLE='Run with,OLAP', $
DEFINE MRE_PARMS_AL/A3 = IF x_PARMS CONTAINS 'alertwizard' THEN 'Yes' ELSE 'No';
TITLE='Alert', $
$

Fex:

-*------------------------------------------------------------------------------
-* Module Name : mrebasedir.fex
-* Description : Program to display the contents of a BASEDIR HTML file.
-* This report lists MRE entities by folder for a particular
-* BASEDIR HTML file
-* Developed by : Francis Mariani - Francis Mariani Inc.
-* Date Developed: April 2006
-*------------------------------------------------------------------------------
-* Maintenance History
-*------------------------------------------------------------------------------
-* Modified by :
-* Date Modified :
-* Reason :
-* Change ID :
-*------------------------------------------------------------------------------

-SET &ECHO=ALL;

SET PAGE = NOLEAD
SET HOLDATTR = ON
-RUN

-SET &MREBASEDIR = 'enterpri';

FILEDEF MREBASEDIR DISK D:\ibi\WebFOCUS53\basedir\&MREBASEDIR.EVAL\&MREBASEDIR.EVAL.htm
-RUN

TABLEF FILE MREBASEDIR
PRINT
MRE_PROG_NM
MRE_PROG_ID
MRE_PARMS_PP
MRE_PARMS_SU
MRE_PARMS_DF
MRE_PARMS_AL
MRE_FOLDER_PATH
MRE_FOLDER_ID
MRE_FOLDER_NM
MRE_FOLDER_NN
MRE_TITLE
COMPUTE MRE_BASEDIR/A13 = '&MREBASEDIR';

WHERE NOT MRE_LINE_TYPE IN ('BLANK', 'COMMENT', 'HTMLTAG');
WHERE MRE_LINE_TYPE IN ('FEX', 'HTML');

ON TABLE HOLD
END

TABLE FILE HOLD
PRINT
MRE_PROG_NM
MRE_PROG_ID
MRE_PARMS_PP
MRE_PARMS_SU
MRE_PARMS_DF
MRE_PARMS_AL

BY MRE_FOLDER_PATH NOPRINT
BY MRE_PROG_NM NOPRINT

ON MRE_FOLDER_PATH SUBHEAD
"<MRE_FOLDER_NN"

ON MRE_FOLDER_PATH SUBFOOT
" "

HEADING
"<MRE_TITLE (<MRE_BASEDIR|)"
" "

ON TABLE PCHOLD FORMAT EXL2K

ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='Arial', SIZE=8, $
TYPE=HEADING, STYLE=BOLD, SIZE=9, $
TYPE=SUBHEAD, STYLE=BOLD, $
TYPE=TITLE, STYLE=BOLD, COLOR=BLUE, $
ENDSTYLE
END
-RUN

I hope this helps.

Regards,

Francis.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Hi Francis

That looks perfect. However I cannot get the filedef to find the file in basedir. It is on a different server. While I trying to figure out the UNC path to use, I copied the html file into ibi_html figuring I could read it like that but now I can't get that to work either...

FILEDEF XXX HTTP HTTP://path_here/xxx.htm

does not work.

But as soon as I can read the file it looks like your approach is perfect.

Thanks.


WF 8.0.0.5M
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Report This Post
Platinum Member
posted Hide Post
Francis

This is absolutely perfect. I need to change the defines for our purposes (I only want to show links to JSP launch pages) but it is exactly what we need.

Thanks!

Jodye


WF 8.0.0.5M
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Report This Post
Expert
posted Hide Post
Glad to help.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
This looks like it can be really useful.

Is there a way to make these reports executable? Basicaly I was asked to see if there was a way to just list reports in a frame instead of having an entire domain tree (domain/standard reports/reports) for users who just belong to 1 domain.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Expert
posted Hide Post
Using DEFINE or COMPUTE you could change my report to create hyperlinks that would call MRE and run the report.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Do I just link directly to the reports in the app folder in basedir?


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Expert
posted Hide Post
You should create hyperlinks to look exactly like an MRE call:

/ibi_apps/WFServlet?IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT&IBIMR_fex=app%2fadhoc001%2efex&IBIMR_folder=%23adhocreports&IBIMR_domain=enterpri%2fenterpri%2ehtm&IBIMR_Random=4%2b%2d6208113684639962449&


You would have to be logged in to MRE to do this, or add IBIMR_user and IBIMR_pass variables to the link.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Ah that would make sense, thank you sir.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Platinum Member
posted Hide Post
How can I use the & character in the define string without it giving me a FOC error saying there isn't a valid value for "&IBIMR_sub_action" and the rest of the amper variables in the string?


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Virtuoso
posted Hide Post
Use the DEFAULT as in
-DEFAULT &T = &T

We have to use it to print the & in a college name.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Thanks Leah that worked, I was using -SET instead.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Virtuoso
posted Hide Post
You're most welcome. Syntax can get you.

Wonderful weekend to you out there in the FOCUS/WebFOCUS world.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Francis, either I did something wrong or I might just be missing something but html forms do not come up with a program ID, just fex's...is it supposed to be like that?

The reason I ask is because I am loading launch pages and not actual fex files, and since I don't have a program ID for the html forms it's not working properly. Although I did hard code an html launch page form that works great.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Expert
posted Hide Post
This is a revised version of my MRE report, with hyperlinks that run fexes, HTML forms and URLs.

I hope this helps.

By the way, to use an & in a DEFINE or COMPUTE, you can do the following:

'&|IBIMR_fex=' || MRE_PROG_IDX

use the | after the &.

-SET &ECHO=ALL;

SET PAGE = NOLEAD
SET HOLDATTR = ON
-RUN

-DEFAULT &MR_BASE_DIR = 'C:\ibi\apps\basedir';

-SET &MREBASEDIR = 'enterpri';

FILEDEF MREBASEDIR DISK &MR_BASE_DIR.EVAL\&MREBASEDIR.EVAL\&MREBASEDIR.EVAL.htm
-RUN

TABLEF FILE MREBASEDIR
PRINT
MRE_PROG_NM
MRE_PROG_ID
MRE_PARMS_PP
MRE_PARMS_SU
MRE_PARMS_DF
MRE_FOLDER_PATH
MRE_FOLDER_ID
MRE_FOLDER_NM
MRE_FOLDER_NN
MRE_TITLE
COMPUTE MRE_BASEDIR/A13 = '&MREBASEDIR';

WHERE NOT MRE_LINE_TYPE IN ('BLANK', 'COMMENT', 'HTMLTAG');
WHERE MRE_LINE_TYPE IN ('FEX', 'HTML');

ON TABLE HOLD
END
-RUN

DEFINE FILE HOLD
RANDOM1/A6 = EDIT(HHMMSS('A8'),'99$99$99');
MRE_PROG_IDX/A104 =
  IF MRE_PROG_ID CONTAINS '.htm' THEN MRE_PROG_ID ELSE 'app/' || MRE_PROG_ID;
MRE_LINK/A500 =
  IF MRE_PROG_ID CONTAINS 'http://' OR MRE_PROG_ID CONTAINS 'https://' THEN
  '<a target="_blank" href="' || MRE_PROG_ID || '">' || MRE_PROG_NM || '</a>'
ELSE
  '<a target="_blank" href="' ||
  '/ibi_apps/WFServlet?IBIMR_action=MR_RUN_FEX&|IBIMR_sub_action=MR_STD_REPORT' ||
  '&|IBIMR_fex=' || MRE_PROG_IDX ||
  '&|IBIMR_folder=#' || MRE_FOLDER_ID ||
  '&|IBIMR_domain=' || MRE_BASEDIR || '/' || MRE_BASEDIR || '.htm' ||
  '&|IBIMR_Random=' || RANDOM1 ||
-*'&|IBIMR_user=admin&|IBIMR_pass=' ||
  '">' || MRE_PROG_NM || '</a>';
END
-RUN

TABLE FILE HOLD
PRINT
MRE_LINK
-*MRE_PROG_NM
MRE_PROG_ID
MRE_PARMS_PP
MRE_PARMS_SU
MRE_PARMS_DF

BY MRE_FOLDER_PATH            NOPRINT
BY MRE_PROG_NM                NOPRINT

ON MRE_FOLDER_PATH SUBHEAD
"<MRE_FOLDER_NN"

ON MRE_FOLDER_PATH SUBFOOT
" "

HEADING
"<MRE_TITLE (<MRE_BASEDIR|)"
" "

ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=HEADING, STYLE=BOLD, SIZE=9, $
TYPE=SUBHEAD, STYLE=BOLD, $
ENDSTYLE
END
-RUN



Regards.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Thanks again Francis, I finally got everything working. I did have to change the master file a little to accomadate the program ID for htm files though.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Expert
posted Hide Post
.eric,

Could you tell me what the change is?

Cheers,

Francis.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
$-- Determine HTML attributes
DEFINE x_HTS/I4 = POSIT(MRE_LINE, 200, 'app/', 4, 'I4') + 4;
DEFINE x_HTE/I4 = POSIT(MRE_LINE, 200, '.htm', 4, 'I4') + 3;
DEFINE x_HTL = x_HTE - x_HTS + 1;
DEFINE x_HTML_ID/A12 = SUBSTR(200, MRE_LINE, x_HTS, x_HTE, x_HTL, 'A12');
DEFINE x_HTMNS/I4 = POSIT(MRE_LINE, 200, '''>', 2, 'I4') + 2;
DEFINE x_HTMNE/I4 = POSIT(MRE_LINE, 200, '', 4, 'I4') - 1;
DEFINE x_HTMNL = x_HTMNE - x_HTMNS + 1;
DEFINE x_HTML_NM/A100 = SUBSTR(200, MRE_LINE, x_HTMNS, x_HTMNE, x_HTMNL, 'A60');

I just copied what you used for FEX attributes and applied it as HTM instead.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.6.5 w/IIS + Tomcat
 
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006Report This Post
Expert
posted Hide Post
y'all ought to team up to write this all up as an article for Focus on Developers; this is wicked cool.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
Here is the master to read mre html for 76.

Thanks Francis for your original - it saved me a lot of time and effort.

$-------------------------------------------------------------------------------
$ Module Name : mrebasedir.mas
$ Description : Master to describe the contents of a BASEDIR HTML file
$ Developed by : Francis Mariani - Francis Mariani Inc.
$ Date Developed: April 3006
$-------------------------------------------------------------------------------
$ Maintenance History
$-------------------------------------------------------------------------------
$ Modified by : Hammo1j	
$ Date Modified : Dec 2008
$ Reason : Update for 76
$ Change ID : Gamma Epsilon
$-------------------------------------------------------------------------------

FILE=MREBASEDIR, SUFFIX=FIX, DATASET="\\electra\c$\wf76\ibi\WebFOCUS76\basedir\projmgmt\projmgmt.htm", $

SEGNAME=MRE_LINE, SEGTYPE=S0, $
FIELD=, ALIAS=MRE_LINE, A300, A300, MISSING=OFF ,$
$
DEFINE x_LINE_EDIT1/A300 = CTRAN(300, MRE_LINE, BYTVAL('<','I3'), BYTVAL('[','I3'), 'A300');
DEFINE x_LINE_EDIT/A300 = CTRAN(300, x_LINE_EDIT1, BYTVAL('>','I3'), BYTVAL(']','I3'), 'A300');
DEFINE MRE_LINE_TYPE/A10 =
IF MRE_LINE EQ '' THEN 'BLANK' ELSE
IF MRE_LINE CONTAINS '<!--' THEN 'COMMENT' ELSE
IF MRE_LINE CONTAINS 'HTML>' OR 'HEAD>' OR 'BODY>' OR 'FONT>' OR '<P>' THEN 'HTMLTAG' ELSE
IF MRE_LINE CONTAINS '<TITLE>' THEN 'TITLE' ELSE
IF MRE_LINE CONTAINS '.kmd' OR 'app/help.htm' THEN 'MISC' ELSE
IF MRE_LINE CONTAINS '<A HREF=''#' THEN 'FOLDER' ELSE
IF MRE_LINE CONTAINS '.fex' AND MRE_LINE OMITS 'mrv/' THEN 'FEX' ELSE
IF MRE_LINE CONTAINS '.htm' THEN 'HTML' ELSE
'LINE';
$
$-- Determine Folder attributes
DEFINE x_FOLDER_ID/A13 = SUBSTR(300, MRE_LINE, 10, 22, 13, 'A13');
DEFINE x_FONMS/I4 = POSIT(MRE_LINE, 300, '>', 1, 'I4') + 1;
DEFINE x_FONME/I4 = POSIT(MRE_LINE, 300, '</A>', 4, 'I4') - 1;
DEFINE x_FOLDER_NM/A100 = SUBSTR(300, MRE_LINE, x_FONMS, x_FONME, 100, 'A100');

DEFINE x_FOLDER_IDY/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_ID ELSE '';
DEFINE x_FOLDER_NMY/A100 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_NM ELSE '';

DEFINE MRE_FOLDER_ID/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_IDY ELSE MRE_FOLDER_ID;
DEFINE MRE_FOLDER_NM/A100 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_NMY ELSE MRE_FOLDER_NM;

$-- Determine Parent folder if folder is a subfolder
DEFINE x_PFONMS/I4 = POSIT(MRE_LINE, 300, 'belongsto=', 10, 'I4') + 10;
DEFINE x_PFONME/I4 = POSIT(MRE_LINE, 300, '>', 1, 'I4') - 1;
DEFINE x_PFOLDER_IDX/A13 = SUBSTR(300, MRE_LINE, x_PFONMS, x_PFONME, 13, 'A13');
DEFINE x_PFOLDER_IDY/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_PFOLDER_IDX ELSE '';
DEFINE x_PFOLDER_IDZ/A13 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_PFOLDER_IDY ELSE x_PFOLDER_IDZ;
DEFINE MRE_PFOLDER_ID/A13 = IF x_PFOLDER_IDZ EQ MRE_FOLDER_ID THEN '' ELSE x_PFOLDER_IDZ;

DEFINE MRE_FOLDER_PATH/A30 = IF MRE_PFOLDER_ID EQ '' THEN MRE_FOLDER_ID ELSE MRE_PFOLDER_ID || (' > ' | MRE_FOLDER_ID);

DEFINE MRE_FOLDER_NN/A150 = IF MRE_LINE_TYPE EQ 'FOLDER' THEN x_FOLDER_NMY || (' (' | MRE_FOLDER_PATH || ')') ELSE MRE_FOLDER_NN;
$
$-- Determine FEX attributes
DEFINE x_FXS/I4 = POSIT(MRE_LINE, 300, 'app/', 4, 'I4') + 4;
DEFINE x_FXE/I4 = POSIT(MRE_LINE, 300, '.fex', 4, 'I4') + 3;
DEFINE x_FXL = x_FXE - x_FXS + 1;
$ for 76
DEFINE x_FEX_ID/A70 = SUBSTR(300, MRE_LINE, x_FXS, x_FXE, x_FXL, 'A70');
DEFINE x_FXNMS/I4 = POSIT(MRE_LINE, 300, '''>', 2, 'I4') + 2;
DEFINE x_FXNME/I4 = POSIT(MRE_LINE, 300, '</A>', 4, 'I4') - 1;
DEFINE x_FXNML = x_FXNME - x_FXNMS + 1;
DEFINE x_FEX_NM/A100 = SUBSTR(300, MRE_LINE, x_FXNMS, x_FXNME, x_FXNML, 'A100');

DEFINE MRE_FEX_ID/A70 = IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_ID ELSE '';
DEFINE MRE_FEX_NM/A100 = IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_NM ELSE '';
$
$-- Determine HTML attributes
DEFINE x_HTS/I4 = POSIT(MRE_LINE, 300, 'A HREF=', 4, 'I4') + 8;
DEFINE x_HTE/I4 = POSIT(MRE_LINE, 300, '.htm', 4, 'I4') + 3 ;
DEFINE x_HTL = x_HTE - x_HTS + 1;
DEFINE x_HTML_URL/A100 = SUBSTR(300, MRE_LINE, x_HTS, x_HTE, x_HTL, 'A100');
DEFINE x_HTMNS/I4 = POSIT(MRE_LINE, 300, '''>', 2, 'I4') + 2;
DEFINE x_HTMNE/I4 = POSIT(MRE_LINE, 300, '</A>', 4, 'I4') - 1;
DEFINE x_HTMNL = x_HTMNE - x_HTMNS + 1;
DEFINE x_HTML_NM/A100 = SUBSTR(300, MRE_LINE, x_HTMNS, x_HTMNE, x_HTMNL, 'A100');
$
$-- Determine Program attributes
DEFINE MRE_PROG_ID/A100 =
IF MRE_LINE_TYPE EQ 'HTML' THEN x_HTML_URL ELSE
IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_ID ELSE '';
TITLE='Program ID', $
DEFINE MRE_PROG_ID_UC/A100 = UPCASE(100,MRE_PROG_ID,'A100') ;
TITLE='UC Program ID', $
DEFINE MRE_DESCRIPTION/A100 =
IF MRE_LINE_TYPE EQ 'HTML' THEN x_HTML_NM ELSE
IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_NM ELSE '';
TITLE='Program Name', $
DEFINE MRE_DESCRIPTION_UC/A100 = UPCASE(100,MRE_DESCRIPTION,'A100') ;
TITLE='UC Program Name', $
DEFINE MRE_PROG_NN/A220 =
IF MRE_LINE_TYPE EQ 'HTML' THEN x_HTML_URL || (' - ') | x_HTML_NM ELSE
IF MRE_LINE_TYPE EQ 'FEX' THEN x_FEX_ID || (' - ') | x_FEX_NM ELSE '';
TITLE='Program', $

$
$-- Determine Domain name
DEFINE x_TTS/I4 = POSIT(MRE_LINE, 300, '<TITLE>', 7, 'I4') + 7;
DEFINE x_TTE/I4 = POSIT(MRE_LINE, 300, '</TITLE>', 8, 'I4') - 1;
DEFINE x_TTL = x_TTE - x_TTS + 1;
DEFINE x_TITLEX/A100 = SUBSTR(300, MRE_LINE, x_TTS, x_TTE, x_TTL, 'A100');

DEFINE MRE_TITLE/A100 = IF MRE_LINE_TYPE EQ 'TITLE' THEN x_TITLEX ELSE MRE_TITLE;

$
$-- Determine MRE parameters
DEFINE x_PMS/I4 = POSIT(MRE_LINE, 300, 'MRFLAG=', 7, 'I4') + 8;
DEFINE x_PME/I4 = POSIT(MRE_LINE, 300, '''>', 2, 'I4') - 1;
DEFINE x_PML = x_PME - x_PMS + 1;
DEFINE x_PARMS/A200 = SUBSTR(300, MRE_LINE, x_PMS, x_PME, x_PML, 'A200');

DEFINE MRE_PARMS_PP/A3 = IF x_PARMS CONTAINS 'skipamper' THEN 'No' ELSE 'Yes';
TITLE='Prompt for,Parameters', $
DEFINE MRE_PARMS_SU/A3 = IF x_PARMS CONTAINS 'hidden' THEN 'No' ELSE 'Yes';
TITLE='Show on,User List', $
DEFINE MRE_PARMS_DF/A3 = IF x_PARMS CONTAINS 'defer' THEN 'Yes' ELSE 'No';
TITLE='Only run,Deferred', $
DEFINE MRE_PARMS_OL/A3 = IF x_PARMS CONTAINS 'runasolap' THEN 'Yes' ELSE 'No';
TITLE='Run with,OLAP', $
DEFINE MRE_PARMS_AL/A3 = IF x_PARMS CONTAINS 'alertwizard' THEN 'Yes' ELSE 'No';
TITLE='Alert', $
$




Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
looks like a TOP 10 T&T to me!

Francis, no kidding.
submit this!
it totally rocks.
i just realized i said that already above.

Francis, i second John's idea to
change the length of a fexname from /A12 to /A70 or something way bigger.

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] how to list reports in a dashboard block

Copyright © 1996-2020 Information Builders