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] App Studio - Report Procedure Firing Twice with One Button Click

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] App Studio - Report Procedure Firing Twice with One Button Click
 Login/Join
 
Gold member
posted
I have converted a v7.7.05-created HTML form to v8.1.04 (i.e., I have simply opened the form in the HTML Canvas and let App Studio do its thing). When I run the form, it presents itself looking pretty much like it did in v7.7.05 (whew!), but when I click the "run" button, the associated (external) report procedure is being executed TWICE. Ideas?

Craig

This message has been edited. Last edited by: Craig R.,


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
 
Posts: 57 | Location: Des Moines, IA | Registered: April 30, 2009Report This Post
Guru
posted Hide Post
Did you look at your tasks? I have seen it where I have had the same task assigned twice somehow.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Gold member
posted Hide Post
Thanks, MattC, but it doesn't appear to me that they're in there twice.

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
 
Posts: 57 | Location: Des Moines, IA | Registered: April 30, 2009Report This Post
Member
posted Hide Post
Have you tried commenting out the OnExecute line in the javascript that was put there in the 7.7 release?


WebFOCUS 8.1.04; SQL Server 2012; Windows 7; Windows Server 2012 R2;
 
Posts: 26 | Registered: November 21, 2005Report This Post
Gold member
posted Hide Post
Rob:

I think you're onto something here! Yes, I did comment-out the OnExecute line and the report did only execute once. But now I'm noticing that if my validation code that's in the run button's click event catches an error and issues an alert, the "return;" following the alert doesn't stop the report from running! I'm new to v8, so can you tell me how to "derail" a procedure from executing if you decide, in code, that it shouldn't?

Thanks,

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
 
Posts: 57 | Location: Des Moines, IA | Registered: April 30, 2009Report This Post
Member
posted Hide Post
You will need to have two buttons.

The first button would be attached to run the focexec. You would then hide this button on the page.

The second button would be used to run your validation function. Your validation function, when passed, would then fire the click event on the first button.

This is the only way that I know to do your own validation at this time.


WebFOCUS 8.1.04; SQL Server 2012; Windows 7; Windows Server 2012 R2;
 
Posts: 26 | Registered: November 21, 2005Report This Post
Gold member
posted Hide Post
Create a javascript function that if it is false will return a value other than 0. For example:


function myTest()
if (fromDate > toDate){
alert("From date(" + dateFrom + ") must be less than To date(" + dateTo + ")");
return (2);
}
return (0);
}



In your Tasks & Animations the task that isassociated with the run button - say 'Task 2' - make a javascript call to 'myTest' - then add the additional task under it to run the report.

in the request window it should look like this:

javascript call
External procedure/myReport


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
 
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003Report This Post
Expert
posted Hide Post
quote:
The first button would be attached to run the focexec. You would then hide this button on the page.

The second button would be used to run your validation function. Your validation function, when passed, would then fire the click event on the first button.

This is the only way that I know to do your own validation at this time.


That's a lot of fiddling in this great new world of App Studio 48.1.04...


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
Gold member
posted Hide Post
OK, I don't know if these are the prescribed steps -- and maybe there's a shorter way -- but here's what I did, prompted by mrguru's suggestion:

1. Removed the click event for my Run button, renaming the btnRun_onclick function to btnRun_validate.

2. Changed all the return's in the validate code to return(2).

3. Removed the OnExecute(ctrl) as the last statement in btnRun_validate.

4. Added the javascript call to btnRun_validate ahead of the External procedure call in the Requests/Actions box in Tasks & Animations.

It now works! Did not appear to need a return(0) as the last statement in the btnRun_validate function, but I went ahead and put it in there...

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
 
Posts: 57 | Location: Des Moines, IA | Registered: April 30, 2009Report This Post
Gold member
posted Hide Post
Agree with you, Francis! Seems like a reversal in productivity to me. Is it coincidental that going from Windows 7 to Windows 8 felt the same? Will we be returning to "normal" with WebFOCUS 10??

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
 
Posts: 57 | Location: Des Moines, IA | Registered: April 30, 2009Report 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] App Studio - Report Procedure Firing Twice with One Button Click

Copyright © 1996-2020 Information Builders