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......multiple headings and loop

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SOLVED......multiple headings and loop
 Login/Join
 
Member
posted
Hi,

I'd like to have the heading change to the right heading based on the country code in the following fex. I'm thinking it must have to loop through the records, and pick up the correct heading by using the GOTO's??

TABLE FILE CAR
SUM
SEATS
BY COUNTRY
BY MODEL
ON COUNTRY PAGE-BREAK

-IF COUNTRY IS 'FRANCE' THEN GOTO HEADING2 ELSE IF COUNTRY NE 'FRANCE' THEN GOTO NOTFRANCE;
-NOTFRANCE
HEADING
"This should be the heading for countries other than France"
-GOTO FINISHUP
-HEADING2
HEADING
"FRANCE"
-FINISHUP
ON TABLE PCHOLD FORMAT PDF
END

Hopefully pretty basic stuff?? Would appreciate any suggestions or direction!
thanks, Donna

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


Dev Studio 8.1.0.4, App Studio 8.1.5m, Reporting Server 8.1.4, InfoAssist, Active Technologies, Windows 2003 Server, Windows7
 
Posts: 20 | Location: Wheaton College | Registered: April 25, 2005Report This Post
Virtuoso
posted Hide Post
DEFINE FILE CAR
TITLE /A70V = IF COUNTRY EQ 'FRANCE' THEN 'This should be the heading for France' ELSE 'This should be the heading for countries other than France: ' | COUNTRY;
END
TABLE FILE CAR
SUM
 SEATS
BY COUNTRY
BY MODEL
ON COUNTRY PAGE-BREAK

HEADING
"<TITLE"

ON TABLE PCHOLD FORMAT PDF
END

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


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Thank you very much Martin. I was trying to simplify my code by using the car file, but realized I didn't really express what my issue was. All of my output will be in the heading. If the country is France, the heading will produce only two lines, for all other countries the heading should be three.

I've corrected the code -

TABLE FILE CAR
SUM
SEATS NOPRINT
BY COUNTRY NOPRINT
BY MODEL NOPRINT
ON COUNTRY PAGE-BREAK

-IF COUNTRY IS 'FRANCE' THEN GOTO HEADING2 ELSE IF COUNTRY NE 'FRANCE' THEN GOTO NOTFRANCE;
-NOTFRANCE
HEADING
"THIS COUNTRY IS NOT FRANCE <60>" "
"Model Name <60>" "
"Number of Seats (eliminate this line if France) <58>
-GOTO FINISHUP

-HEADING2
HEADING
"THIS COUNTRY SHOULD BE FRANCE<60>" "
"Model Name <60>
-FINISHUP

ON TABLE PCHOLD FORMAT PDF
END

Again, I'm sorry I did not get my code correct to show what I was trying to get done.

thanks, Donna


Dev Studio 8.1.0.4, App Studio 8.1.5m, Reporting Server 8.1.4, InfoAssist, Active Technologies, Windows 2003 Server, Windows7
 
Posts: 20 | Location: Wheaton College | Registered: April 25, 2005Report This Post
Virtuoso
posted Hide Post
Hi Donna, not quit sure what is your goal, but except if other Guru tells the opposite, you cannot really have all of your output in the header except if you pre-calculate them especially in this example where there are multiple Model that cannot be aggregated in a single header.

My example shows you the detail of the data and as you can see, only the first value is displayed in the header.

DEFINE FILE CAR
TITLE1 /A30V = IF COUNTRY EQ 'FRANCE' THEN 'THIS COUNTRY SHOULD BE FRANCE' ELSE 'THIS COUNTRY IS NOT FRANCE';
TITLE2 /A30V = IF COUNTRY EQ 'FRANCE' THEN 'THIS COUNTRY IS FRANCE' ELSE 'THIS COUNTRY IS NOT FRANCE ***';
END
TABLE FILE CAR
SUM SEATS
BY COUNTRY
BY MODEL
ON COUNTRY PAGE-BREAK

HEADING
"<TITLE1"
"Model Name: <MODEL"
"Number of Seats: <SEATS"
"<TITLE2"
""

ON TABLE PCHOLD FORMAT PDF
END


And I don't know any way to have different number of rows in the header except using variables assigned outside of the TABLE FILE...END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
If you have to use HEADING then what Martin suggests is potentially the method to use.

However, evaluate whether SUBHEAD may work for you because you can utilise the WHEN keyword -
TABLE FILE CAR
SUM
 SEATS NOPRINT
BY COUNTRY NOPRINT
BY MODEL NOPRINT
ON COUNTRY PAGE-BREAK
ON COUNTRY SUBHEAD
"THIS COUNTRY IS NOT FRANCE <60>"
"Model Name <60>"
"Number of Seats (eliminate this line if France) <58>"
WHEN COUNTRY NE 'FRANCE'

ON COUNTRY SUBHEAD
"THIS COUNTRY SHOULD BE FRANCE<60>"
"Model Name <60>"
WHEN COUNTRY EQ 'FRANCE'

ON TABLE PCHOLD FORMAT PDF
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
thank you both Martin and Tony - even though I wasn't clear on what I wanted for output... I understand the application of both suggestions and will keep code for future reference. I think the subhead is going to get me where I need to be with output so will go forward with that suggestion.
thanks again! Donna


Dev Studio 8.1.0.4, App Studio 8.1.5m, Reporting Server 8.1.4, InfoAssist, Active Technologies, Windows 2003 Server, Windows7
 
Posts: 20 | Location: Wheaton College | Registered: April 25, 2005Report 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......multiple headings and loop

Copyright © 1996-2020 Information Builders