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.
I am trying to call a webfocus report from maintain. The report works fine when I run it by itself, but when I call it from maintain I receive the following error, FOC03690 Called Proc, EmergencyFunding, wants 0 output parms but was called w/ 1. I am passing one parameter to the .fex, and I want to display the output in an HTML object on a form. The call I am using in Maintain is
EXEC EmergencyFunding FROM ReportVar INTO ReportStack;
Any ideas on why I receive this error would be greatly appreciated.
Thanks, BryanThis message has been edited. Last edited by: brjohnson,
Bryan Johnson WebFOCUS 7.7.03 Maintain Win 7 Excel, PDF, HTML
EXEC EmergencyFunding FROM ReportVar INTO ReportStack;
The focexec EmergencyFunding should contain a parameter &1, which is equivalent to ReportVar that you are passing on the EXEC line. You cannot refer to &ReportVar in the focexec, they are only read in sequence from the EXEC call as &1, &2 etc.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Also, is the ReportStack an HTML stack or a column based stack?
From the original post it is an HTML stack so you should have ON TABLE PCHOLD FORMAT HTMTABLE as the output in the focexec.This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I cannot remember now the exact syntax and the expected output, I would have to start another server to get to the maintain code, and its late here. Initially your code looks fine.
Something is niggling about this error, and I will test over the weekend.
Thanks for your patience.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
This message is the one produced when the focexec fails to produce an output.
To debug this run through focMsg:
Repeat FocMsg.FocCount; Counter/I3=1;
Type "<FocMsg(Counter).Msg";
Endrepear Counter=Counter+1;
after the EXEC. You may have to view source to see the whole output as a left carat can stop the display, or other elements get in the way.
This can happen, for example, if ReportVar has a single quote in it. If that is the case you can use &1.QUOTEDSTRING in the focexec WHERE to help.This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Hi Bryan When using : ON TABLE PCHOLD FORMAT HTMLTABLE or ON TABLE PCHOLD FORMAT HTML you need to have: COMPUTE HTMLSTK.HTML/A2000; EXEC procedure FROM var INTO HTMLSTK Of course your stack name can be whatever you want it to be.
And then display the stack in an HTML Object. However the error that you are getting implies that no records are being returned. The best way to debug an EXEC statement is, at the beginning of the FEX, add:
-SET &ECHO=ALL;
When the procedure runs, the entire FEX is echoed back to the screen. Then, on your Maintain form, place an HTMLTable populated from FOCMSG.MSG. This is a system stack that returns all messages typed to the screen, back to the Maintain. You will see any errors or problems encountered at runtime.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
Alan All I know is what works for me. The only doc'd reference that I could find for it was part of the FanClubs tutorial. You are correct though. I usually use an A200. So I usually have:
Compute HTMLSTK.HTML/A200; EXEC procedure INTO HTMLSTK
In the procedure I use: ON TABLE PCHOLD FORMAT HTML
and I can display HTMLSTK.HTML an HTMLObject on my form. I tried this morning and got an error with: ON TABLE PCHOLD FORMAT HTMLTABLE.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
Weird isn't it. I ALWAYS use HTMTABLE. I think that some browsers, maybe it's safari on mac, really wobbles with maintain and an html object populated with HTML output.
But as they say, if it works for you.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
This message is the one produced when the focexec fails to produce an output.
You were correct about this Alan. This was due to me sending the parameters to the .fex in upper case rather than lower. I am still confused about the difference between
ON TABLE PCHOLD FORMAT HTML
and
ON TABLE PCHOLD FORMAT HTMLTABLE
The documentation states that to preserve the report formatting to use
ON TABLE PCHOLD FORMAT HTMLTABLE
This seems to be the complete opposite for me, because when I use that the report is displayed with default formatting. On the other hand when I use
ON TABLE PCHOLD FORMAT HTML
all the custom formatting is preserved. I'm not sure why this is happening, but my report works and that is what really concerns me.
Thanks for all your help, BryanThis message has been edited. Last edited by: brjohnson,
Bryan Johnson WebFOCUS 7.7.03 Maintain Win 7 Excel, PDF, HTML
One more thing, is there a way I can handle this error, with an if statement perhaps, that would allow me to print a more helpful message to the user if they execute a report that has no output records?
Bryan
Bryan Johnson WebFOCUS 7.7.03 Maintain Win 7 Excel, PDF, HTML
To issue a message to a user, you could just place some message into the htmlStack in the focexec.
-IF &LINES GT 0 GOTO :BYPASS;
TABLE FILE CAR
SUM
COMPUTE MSG/A50 = 'No Records retrieved';
BY HIGHEST 1 COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT HTMTABLE
END
-EXIT
-:BYPASS
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
If no records are returned from the Table request, then you can test: IF HTMLSTK.FOCCOUNT = 0 THEN... Or whatever the name of your stack is. Just make sure you do a: STACK CLEAR HTMLSTK Before you do your exec.
You can also try issuing before the EXEC: SYS_MGR.FOCSET("WARNING", "OFF");
That should turn off the error being returned the the screen.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
I have tried using these lines prior to issuing the EXEC
SYS_MGR.FOCSET("WARNING", "OFF");
and
SYS_MGR.FOCSET("MESSAGE", "OFF");
and
SYS_MGR.FOCSET("EMGSRV", "OFF");
and even
SYS_MGR.FOCSET("MAINTAIN_WARNING", "OFF");
none of these turn off this error message. I am able to print my own more descriptive message to the user, but the warning still appears. The worst part about it is the fact that it locks the application when the message appears, and you have to close the entire app and relaunch it. Any ideas on what I may be missing?
BryanThis message has been edited. Last edited by: brjohnson,
Bryan Johnson WebFOCUS 7.7.03 Maintain Win 7 Excel, PDF, HTML
Bryan Programming has informed me that this project is on the "To Do" list. I'm afraid the SYS_MSG commmands cannot shut off that messsage.
Having said that, your application should not freeze. You can branch depending on the foccount of the stack receiving the data. What is happening on your form?
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
Mark Upon further review the form does not completely lock, but the scroll bar disappears. Since none of the buttons on my form were visible when the scroll bar was all the way up it seemed as the though the application was locked. I found the buttons were still functional when I moved them higher up on the form so they would be visible when the form was first loaded. So while the app is not technically frozen when this message appears, if there are no buttons immediately visible when the form loads the only option the user has is to close the browser. I have found a workaround for this problem by adding this line to the fex
SET EMPTYREPORT = ON
This prevents this error message from being displayed since the fex is always returning some form of output, but it would certainly be nice to be able to turn the message off completely.
Bryan
Bryan Johnson WebFOCUS 7.7.03 Maintain Win 7 Excel, PDF, HTML