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] Portal and a HTML Form is double running reports on load

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Portal and a HTML Form is double running reports on load
 Login/Join
 
Member
posted
I have an HTML form set up with a list of parameters to pass to a few reports I have on a portal. I used the instructions and some trial and error and the form works perfectly and all the reports refresh without issue.

The issue I am having is that when I initially load the portal all the reports seem to run twice (the slower the connection the more noticeable this is). They run on the initial load (before the html form is finished loading) and then once the html form is loaded the javascript on it with the onInitialUpdate fires and it runs the reports again as it has the refresh in there. When that refresh fires all the reports run with the correct values from the parameter. But the reports themselves have different defaults than the parameter form so it seems like the report changes while you are looking at it. The first time it runs without the values from the htmlform and the second time it runs with the values. This only happens on the initial load. Once loaded you can change pages and come back and everything is wonderful.

Is there a setting somewhere in portal that say to not run the reports by default? I really don't want to run every report twice on initial load. I haven't been able to find any setting like that, or anyway to do that from edit mode on the portal.

-Tim

This message has been edited. Last edited by: <Kathryn Henning>,


Product: WebFocus 8808,Server: Ubuntu Linux, Output: html/excel/pdf
 
Posts: 8 | Registered: December 30, 2013Report This Post
Master
posted Hide Post
I wonder if one possibility is that the HTML form is getting refreshed, and with that, the other panels are then rerun.

The REFRESH_ALL_BUT_SELF parameter of the refresh function is supposed to prevent that.

Here is what my 'refreshReports()' function looks like; my report panels only refresh one time upon page load:
function refreshReports(){
var name = this.window.name;
parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());
parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_SELF, name);
}  




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
Member
posted Hide Post
Thanks David, I don't believe that is it.

You can see that the html form isn't finished loading yet and the other reports are loaded. Then when the html form is finished it sends out the refreshall and all the reports then run with the correct parameters.

It's like if I put just a report on the portal (no html form) the report runs and returns with the defaults of the report. If I add an html form then I "reload" the page (again only happens on full reloads) you can see the report run with the report's parameters...then run again when the html form is loaded. It's like I need a way to stop the report from running initially on a refresh.

I have the following in my refreshall

parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());
parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_SELF , name, null, parent.BipIframeInterface.AMPERS_PAGE_ONLY);


Product: WebFocus 8808,Server: Ubuntu Linux, Output: html/excel/pdf
 
Posts: 8 | Registered: December 30, 2013Report This Post
Member
posted Hide Post
Oh and I don't know if I stated this clearly, but if I hit the run button on the html form the reports only run once like they are suppose to. So it's just on the "initial" load that they run twice.


Product: WebFocus 8808,Server: Ubuntu Linux, Output: html/excel/pdf
 
Posts: 8 | Registered: December 30, 2013Report This Post
Master
posted Hide Post
One troubleshooting technique I have used: Run the HTML Composer page stand-alone (from WFDS) and check for any JavaScript errors.
 
Posts: 822 | Registered: April 23, 2003Report This Post
Master
posted Hide Post
OK, your refresh function runs fine when triggered by your 'run' button.

Are you also calling your refresh function from onInitialUpdate()?:
function onInitialUpdate(){
 refreshReports();
}  
 
Posts: 822 | Registered: April 23, 2003Report This Post
Member
posted Hide Post
Yes. And it is working as I believe once the html form is finished it fires then causes the other reports to refresh. Here is the entire javascript.

//Begin function window_onload
function window_onload() {

UpdateData();

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports

}
//End function window_onload

function onInitialUpdate(){


refreshReports();
}


//Begin function form1Submit_onclick
function form1Submit_onclick(ctrl) {
refreshReports();

}
//End function form11Submit_onclick

function refreshReports(){
var name = this.window.name;
parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());
parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_SELF , name, null, parent.BipIframeInterface.AMPERS_PAGE_ONLY);
}


Product: WebFocus 8808,Server: Ubuntu Linux, Output: html/excel/pdf
 
Posts: 8 | Registered: December 30, 2013Report This Post
Master
posted Hide Post
I would check the request list for your IFrame. I've had it happen to me multiple times that the HTML Composter has added extra requests at the bottom of the HTML and then included all of them in the request list. IE request_list='1;2;3;4' then if the the IFRAME is set to auto execute it would execute and run the query four times to the IFRAME. Don't know if the same thing is happening for you, but worth checking. APP Studio's html composter should show you all of your requests in the GUI and give you a way to maintain it, where in DS you still have to manually make the adjustment in the HTML. As always in that case, developer beware.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Member
posted Hide Post
I'm using webfocus portals tool. So the html form is just a form with a date and some other fields but has no reports on the form. I drag that onto my portal and drag a report over and it works (if you have it all set up right). It's not done in application studio but is done from within the webfocus portal on edit mode.

I've had the same problem you've had Eric when doing an html dashboard like that.


I viewed the html on the form to be sure and there is nothing on there for executing anything other than the javascript. no request_list or anything.


Product: WebFocus 8808,Server: Ubuntu Linux, Output: html/excel/pdf
 
Posts: 8 | Registered: December 30, 2013Report This Post
Guru
posted Hide Post
No Request List? So how is your button running the report then? Is there anything happening for the default onload request? I double check and make sure that request is empty.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Member
posted Hide Post
J, The portal is refreshed based off of javascript. So on the html form you add javascript (which is listed earlier in this post) So click on run it fires javascript which refreshes all the reports on the portal you are in. There is no request list in the html form itself as there is no report tied to the html form. Javascript handles running what reports on on the dashboard.

I did come up with a solution I don't like much, but works. I made the defaults of all my reports be the same default as the html form and I turned off the refreshreports on the onInitialUpdate. That fixes the issue, but now I have to remember whenever I have to change the default on the parameter form to change the defaults on all the reports also. Long as I keep up with doing that it should work. Which is what I don't like cuz 1 year from now when someone asks for a new default I won't remember how it's all set up.


Product: WebFocus 8808,Server: Ubuntu Linux, Output: html/excel/pdf
 
Posts: 8 | Registered: December 30, 2013Report 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] Portal and a HTML Form is double running reports on load

Copyright © 1996-2020 Information Builders