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] Troubles With &Var in Heading

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Troubles With &Var in Heading
 Login/Join
 
Gold member
posted
I have a fairly common need to use an &variable from an auto-prompt in my headings. I am running into issues when the auto-prompt is a multi-select. I was able to replicate it using the Car file.

 
TABLE FILE CAR
SUM
 AVE.MPG AS 'Average,MPG'
BY SEATS NOPRINT
ON SEATS PAGE-BREAK
HEADING
"Miles per Gallon By Seats"
-IF &COUNTRY.EVAL EQ FOC_NONE THEN GOTO NO_EXCLUDE
"Seats: <AVE.SEATS  -  Excludes &COUNTRY.EVAL"
-GOTO MORE_CODE
-NO_EXCLUDE
"Seats: <AVE.SEATS  - Includes All Countries"
-MORE_CODE
WHERE COUNTRY NE &COUNTRY.(OR(FIND COUNTRY IN CAR)).Exclude Country.;
END


If you choose either 'No Selection' or a single country the report runs. If you choose two or more countries the report fails. The error message is:
0 ERROR AT OR NEAR LINE 8 IN PROCEDURE examples/prompt_in (FOC261) EXPRESSION IS INCOMPLETE BECAUSE AN OPERATION IS MISSING

I think the error is related to the -IF statement being confused by the ORs in &COUNTRY.

Any ideas would be appreciated.

This message has been edited. Last edited by: M Meagher,
 
Posts: 60 | Location: Ellensburg Washington | Registered: May 22, 2009Report This Post
Guru
posted Hide Post
Here you go. Hope this is what you're looking for.

  

TABLE FILE CAR
SUM
 AVE.MPG AS 'Average,MPG'
BY SEATS NOPRINT
ON SEATS PAGE-BREAK
HEADING
"Miles per Gallon By Seats"
-*IF &COUNTRY.EVAL EQ FOC_NONE THEN GOTO NO_EXCLUDE
-IF &COUNTRY CONTAINS ',' THEN GOTO NO_EXCLUDE;
"Seats: <AVE.SEATS  -  Excludes &COUNTRY.EVAL"
-GOTO MORE_CODE
-NO_EXCLUDE
"Seats: <AVE.SEATS  - Includes All Countries"
-MORE_CODE
WHERE COUNTRY NE &COUNTRY.(OR(FIND COUNTRY IN CAR)).Exclude Country.;
END


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


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Virtuoso
posted Hide Post
You only need to test the contents of &COUNTRY against a list of values so just remove .EVAL from &COUNTRY in the -IF statement.

Also, Dialog Manager commands such as: -IF and -GOTO need to be "closed" with a semicolon at the end of the line.

TABLE FILE CAR
SUM
 AVE.MPG AS 'Average,MPG'
BY SEATS NOPRINT
ON SEATS PAGE-BREAK
HEADING
"Miles per Gallon By Seats"
-IF &COUNTRY EQ FOC_NONE THEN GOTO NO_EXCLUDE;
"Seats: <AVE.SEATS  -  Excludes &COUNTRY.EVAL"
-GOTO MORE_CODE;
-NO_EXCLUDE
"Seats: <AVE.SEATS  - Includes All Countries"
-MORE_CODE
WHERE COUNTRY NE &COUNTRY.(OR(FIND COUNTRY IN CAR)).Exclude Country.;
END


I recently installed DevStudio 7.7.01 to play a bit with it. When testing that code, I noticed that FOC_NONE has been replaced by _FOC_NULL when choosing "No Selection" from the drop-down list so watch out for those "new features".

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
I could have swore I tested it without the EVAL!

Thanks for help.
 
Posts: 60 | Location: Ellensburg Washington | Registered: May 22, 2009Report This Post
Guru
posted Hide Post
quote:
HEADING "Miles per Gallon By Seats" -IF &COUNTRY EQ FOC_NONE THEN GOTO NO_EXCLUDE; "Seats:



Hi I just found your post. I need to do something similar and can not get this code to work. I am putting it within the SUBHEAD in the Source tab of my report in Developer Studio. I have the semi-colons and it is close to word for word what is in this post. What am I doing wrong? Thanks


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Virtuoso
posted Hide Post
MAdams1,

Sorry it took so long to give some feedback but I've been absent from Focal Point for a while and I just saw your posting a few minutes ago.

Can you post the actual piece of code you have along with a mock-up of the results you are expecting?

Thanks,
Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
Thank you for your response njsden. I managed to get this to work. I think I didn't have the flow down right before. Anyway it works and I have used it in other reports already. Thank you for the post and teaching me something new.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report 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] Troubles With &Var in Heading

Copyright © 1996-2020 Information Builders