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     [SOLVED/SHARE] Proper way to ref files (with params) in Content repo for HTML/Js?:

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED/SHARE] Proper way to ref files (with params) in Content repo for HTML/Js?:
 Login/Join
 
Virtuoso
posted
Hey all,

I'm trying to utilize code found within some of the 8.1.03 Responsive Demo from IBI as boilerplate to create some nice widgets that pull back actual data. In this case, I have an image tag that upon onclick calls a function that should run a report I give it a reference to. What is the proper/right way to denote reference to a procedure (for my DM literal) that's within my WF content repo if I am implementing the above as follows?:

DM code:

-DEFAULTH &DRILLDOWN = '???';


Js:

function getReport() {
window.open("!IBI.AMP.DRILLDOWN;");
}


HTML:

<img style="position:absolute;cursor:pointer;right:10px;top:60px;width:40px;height:40px" title="!IBI.AMP.TOOLTIP;" onclick="getReport()" src="/ibi_apps/run.bip?BIP_REQUEST_TYPE=BIP_RUN&|BIP_folder=IBFS%253A%252FWFC%252FRepository%252FWFPMResponsiveDemo%252FHidden_Content%252Fimage&|BIP_item=download3.png">


Would I use the "IBFS:/WFC/Repository/.../.../....fex" way of referencing? Or would I use the crazy "/ibi_apps/run.bip?BIP_REQUEST_TYPE=BIP_RUN&|BIP_folder=IBFS%253A%252FWFC%252FRepository" way of referencing the procedure? Or do I need to make modifications to one of these ways of reference? Or is there another way I need to make reference?
Any help will be greatly appreciated!

Thanks in advance!

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


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
Make a call to WF Procedured using HTML FORMS. So oncall of getReport(), just submit the form. You can either use GET or POST method within form.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Virtuoso
posted Hide Post
Ram,

Thanks for your insights! Would you be able to more fully describe/give an example of what you are saying would work for how to correctly reference a report or piece of content stored in the WF8 repo so it will run when I click an image?


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
If I understand your question, you want to run a WebFOCUS report, that is stored in the Data Repository, from a web page that you have created.

If that is the case, take a look at 'Running a Report From WebFOCUS Managed Reporting' from the 'WebFOCUS RESTful Web Services Guide' manual.

URL format per the manual:
 http:// host:port/ibi_apps/rs/ibfs/WFC/Repository/FolderName/ReportName 

The manual has a description of the format, and examples.

This is what we are doing in 8, and it is working great.
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
David,

I was JUST looking at that manual and section after having caught hint of it in another thread. Thank you for your post! I will look into trying this to see if it will work for us, and then get back to this thread with my findings as soon as I can.

Thanks again!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
David,

Sadly we don't have the web services enabled as of yet for WebFocus. I hope to get that to change here soon.

Is there other ways of referencing a .fex to run other than using RESTful web services?


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
This format has worked for a report we just migrated over if we merely click the link (must be in Security Center as an active user and in assigned domain group, but...):

http://server/ibi_apps/WFServl...r1/dir2/fileName.fex


It's not using the RESTful API, and I haven't tried it in the scenario I need to work above yet, but maybe it'll work. ??? Will look into this and get back to everyone.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Guru
posted Hide Post
Coolguy,

Check my example in this post and Ram was talking about this

How to supply null values for the checkbox control


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Virtuoso
posted Hide Post
Rifaz,

Thanks for the link and trying to help. That thread is similar in nature to what I'm looking for, but not quite. I just needed a link formatted in a way that would work for the above scenario I've described.

All,

After trying out different potential ways to get a link to run a report found under Content, I did apply this format in the above scenario I want to work, and got it to run only after hard-coding it into the window.open() function:

function runReport() {
-*window.open("!IBI.AMP.DRILLDOWN;");
window.open("/ibi_apps/WFServlet.ibfs?IBFS1_action=RUNFEX&|IBFS_path=/WFC/Repository/domain/subFolder1/subFolder2/subFolder3/report.fex");
}


If I try to parameterize it with !IBI.AMP.DRILLDOWN; it just claims that the onclick method is not implemented. But if I hard-code it, it all the sudden is implemented and runs the report. ???

Now that I've got the ability to click an image or whatever on a widget and run a report, is there a way to attach parameters to the above URL format to dynamically generate a report based on what's passed? Like, would something like this work:

/ibi_apps/WFServlet.ibfs?IBFS1_action=RUNFEX&|IBFS_path=/WFC/Repository/domain/subFolder1/subFolder2/subFolder3/report.fex<somehow add parameters to the end of the URL to the report targeted>


Any ideas on if this can be done and how?

Thanks in advance!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
Just found the docs on the WFServlet. Will look into those and see if I get the output I need and will update you all after again shortly.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
So, after looking at the docs I found here:

http://infocenter.informationb...source%2Ftopic32.htm

it doesn't really say what format to use to link to a report under Content passing params in the process.

Is there a way/URL link format that I can use to run a report stored in the Content repository passing it parameters before it runs?

Thanks in advance!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Expert
posted Hide Post
This is what gets generated for a drilldown, so it should work as a URL:

For fexes that were migrated from v7.*
/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&IBIWF_msgviewer=OFF&IBIAPP_app=test&&IBIMR_drill=IBFS,RUNFEX,IBIF_ex,true&IBIF_ex=IBFS:/WFC/testing2%7Capp%7Creport1&CLICKED_ON=&TESTDATE=2015/08/27&WFFMT=HTML&SCALE=1

For fexes created in v8.* or migrated from v7.*:
/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&IBIWF_msgviewer=OFF&IBIMR_drill=IBFS,RUNFEX,IBIF_ex,true&IBIF_ex=IBFS:/WFC/Repository/testing2/ThisIsTheFolder/this_is_the_program.fex&CLICKED_ON=&BUS_DTE=2015/08/28&SCALE=2&CURRENCY=_FOC_NULL&WFFMT=HTML


Note that for the old programs the path is IBFS:/WFC/domainName/app/fexName and for the new (and old) programs it is more precise IBFS:/WFC/Repository/domainName/folderName/fexName.fex. I would always use the newer method. To get the Full Path, you probably know that you can view the Resource Tree, right-click on the resource and copy the Full Path. For something that's in a Standard Reports folder, the Full Path is IBFS:/WFC/Repository/domainName/std_reports/folderName/fexName.fex

This message has been edited. Last edited by: Francis Mariani,


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
Master
posted Hide Post
Yep, the Developing Reporting Applications discusses servlet calls in the context of calling reports on the data server (applications).

If I understand you correctly, you want to call a report stored in the Content Repository.

I believe 'best practice' in WF 8, is to use the RESTful web service call.

Something like:
http:// localhost:8080/ibi_apps/rs/ibfs/WFC/Repository/folder1/subfolder1/mycarreport.fex?IBIRS_action=run&COUNTRY=ENGLAND




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
Francis,

Thanks for trying to help. I tried both links and neither worked unfortunately. I just get a bunch of XML output.

David,

You are spot on with my dilemma. I've tried using the RESTful API (being told that it should just work without needing to enable it as an add-on by another on the forums (can't remember who it was)) but it doesn't want to work. I get returncode error 1059:

(FOC1059) VSAM ENTRY-SEQUENCED OR FIXED FILES CANNOT BE INVERTED %1%2%3%4
 A file view or JOIN which results in a file
 inversion cannot be used for FIX or VSAM/ESDS
 files.


Is it really something that needs to be enabled somehow before I can use it? Or should it just work? If it does need enabling, how does one do that?


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
Create a simple TABLE FILE in a focexec in the repository...something like
TABLE FILE CAR
PRINT CAR 
BY COUNTRY
IF COUNTRY EQ &COUNTRY
END 

Build the RESTful URL to call it, and render it in the browser.

If you get a FOC1059, then I would open a case, or perhaps someone on FocalPoint has seen this.
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
David,

Tried what you said with the simple car .fex and RESTful URL call, but I still get the following error:

<ibfsrpc _jt="IBFSResponseObject" language="EN" localizeddesc="Internal exception processing IBFSService.runAdHocFex " 
name="runAdHocFex" returncode="1059" returndesc="Internal exception processing IBFSService.runAdHocFex " subreturncode="0" subsystem="SSYS" type="simple">
<ibfsparams size="7">...</ibfsparams>
<ibfserrorvalues size="1">
<entry key="FUNCTION" value="IBFSService.runAdHocFex"/>
</ibfserrorvalues>
</ibfsrpc>


Does the use of the RESTful API calls to procedures need to be enabled somehow before we can use them? Or should they just work out of the box? What is the Web Services Enablement product component, and do we need this for creating these types of URL calls? I wish I could just use a WFServlet call with parameters. We shouldn't have to buy another add-on to simply call a procedure passing it params that is stored under Content I wouldn't think. Ugh...

Thanks for your help!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
Well, the good news is you are not getting a FOC1059. :-)

Apparently, you are getting a 1059 exception/return call from the service.

The only thing I can think of is checking the folder structure you see (WFC/Repository/...), when you view properties of the fex in WFDS, and comparing to your URL.

For sure, opening a case and sending IB your URL and return error message, would work too.
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
David,

I spoke with an IBIer and he said that the Web Services Enablement product component is a paid add-on. We don't have it, so that's prob why that isn't working at least. Also, he is saying that the servlet calls with params should be working, and got such working for him on his install. He is going to be doing a remote session with me this afternoon to help me debug the issue. I will post the results after we have the remote session later today.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
Thanks for confirming that RESTful is an 'add on'.

For anyone researching this thread in the future, here is the WF RESTful Web Services Test Page, so you can see if you have the 'add on':
http:// localhost:8080/ibi_apps/rs?IBIRS_action=TEST
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
David (and everyone else),

I just got through with the remote session with the IBIer I was working with.

We first confirmed that we were able to use his link formatting with the car example data source with a param passed to it in the browser, and we had success.

We then tried to switch out the car report reference with my own report reference into the link format that had worked within the scenario I initially described above, and got the exception again. It turns out that I not only needed to get rid of the pipe character in between & and IBFS_path= in the link about midway in, but that when ran in the browser, it would state that the method I implemented to run the report from the image in my widget was not implemented; so, I thought maybe we stick the working link format into the original DEFAULTH assignment and use !IBI.AMP.xxx; like I had originally before hard-coding it. This worked!

So, ultimately, when you want to create a link to a report that will run from an element within some custom HTML where the report/graph is stored under Content and not on the Reporting Server, it will look something like the following:

DM code:
-DEFAULTH &DRILLDOWN = 'http://serverName/ibi_apps/WFServlet.ibfs?IBFS1_action=RUNFEX&IBFS_path=/WFC/Repository/domainName/subFolder1/subFolder2/subFolder3/report.fex&Param1=value1&Param2=value2';


Js code:
<script>
function runReport() {
window.open("!IBI.AMP.DRILLDOWN;");
}
</script>


HTML body code:
<img onclick="runReport()" src="path/image.png">


This is the way to correctly utilize the WFServlet call for this scenario in case your site does not have the luxury of getting the Web Services Enablement paid add-on like us currently.

Hope this helps all who will eventually travel this path when working with the 8.1/8.2 releases of AppStudio, etc. where HTML code access has been obliterated or had its carriage returns taken out, etc.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report 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     [SOLVED/SHARE] Proper way to ref files (with params) in Content repo for HTML/Js?:

Copyright © 1996-2020 Information Builders