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] Identifying a line heading or footing in a report.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Identifying a line heading or footing in a report.
 Login/Join
 
Gold member
posted
To identify a line's position in the heading or footing, you need to include the LINE attribute set equal to the integer position of the line (example: LINE=9). However, if lines are deleted/added to the report, the formatting still applies to whatever becomes the new line 9. Is it possible to identify a line by a variable name so whenever the line positioning changes, that line will still have the same formmatting? In other words, if the current line 9 is the company name, instead of

TYPE=TABHEADING
   LINE=9
   STYLE=BOLD


using

TYPE=TABHEADING
   LINE=companyName 
   STYLE=BOLD


so no matter how the lines shift, if the line named "companyLine" is not deleted, it will always be BOLD, regardless of what it's new integer line position is?

Thanks,
George

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Expert
posted Hide Post
If you use an amper variable, you can do this.

But you will need to know this prior to the TABLE FILE.

e.g.
-SET &companyName = IF <condition> THEN 9 ELSE 10 ;
.
.
.
TYPE=TABHEADING, LINE=&companyName, STYLE=BOLD, $


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Hi Waz,

Thanks for the reply. From my readings and your reponse, it appears that
1. "LINE=" must always evaluate to an integer, and
2. I need to know ahead of time on what line companyName will appear.

And there lies the problem. It could be on line 3 today and maybe line 5 tomorrow. Or even worse, fall anywhere inside a of line where nothing else should be BOLD. Where ever it falls I want the formatting to follow, so it will always be BOLD - without me having to manually edit the "TYPE=TABHEADING" section.

This would not be an issue with CSS. Maybe I've reached the limitations of Webfocus. Thanks for trying to help me.

George


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Virtuoso
posted Hide Post
You can pre-define your heading lines using dialogue manager and enumerate, like so:
-SET &LINE=1;
-SET &LINEREF = '';
-SET &HEADING = '';

-SET &FIELD = 'CompanyName';
-SET &HEADING.&LINE = '"<'|&FIELD|'"';
-SET &LINEREF.&FIELD = &LINE;

-SET &LINE = &LINE +1;
-SET &FIELD = 'CompanyAddress';
-SET &HEADING.&LINE = '"<'|&FIELD|'"';
-SET &LINEREF.&FIELD = &LINE;


For your headings you then use:
HEADING
-SET &I = 1;
-REPEAT :HeadLoop WHILE &i LT &LINE;
"&HEADING.&I"
-SET &I = &I + 1;
-:HeadLoop


Then in your style-sheet, you can reference:
-SET &FIELD = 'CompanyName';
TYPE=DATA, LINE=&LINEREF.&FIELD, STYLE=BOLD,$


I'm not entirely sure whether you could access those variables more directly, such as &LINEREF.CompanyName for example.

Also, this will get even more complicated if you also need to reference the correct column! You'll probably need to find the index of the word in the line using GETTOK or something similar.

A word of warning, this is totally untested. And yes, it ain't pretty Wink


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Gold member
posted Hide Post
Wep5622,

Thanks for the brainstorming. When I get a chance, I'll play around with your code.

George


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report This Post
Expert
posted Hide Post
Depending on your version of WebFOCUS, you could use MARKUP.

What controls where this text is ?

MARKUP allows you to embed styling in the data.
e.g.
DEFINE FILE CAR
Country/A20 = IF COUNTRY CONTAINS 'E' THEN '<b>' | COUNTRY | '</b>' ELSE COUNTRY ;
END
TABLE FILE CAR
PRINT COUNTRY
      Country
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE PCHOLD FORMAT EXL2K
-*ON TABLE PCHOLD FORMAT HTML
-*ON TABLE SET NEWLAYOUT ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
UNITS=CM, PAGESIZE='A4', LEFTMARGIN=0.635000, RIGHTMARGIN=0.635000,
    TOPMARGIN=0.635000, BOTTOMMARGIN=0.635000,
    SQUEEZE=ON,
    ORIENTATION=LANDSCAPE, $
TYPE=REPORT, COLUMN=P2, MARKUP=ON, $
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
quote:
What controls where this text is ?


Think of this as a form letter. The user decides where and how the text will appear in the document. This could be a field from a source database or simply customizing the wording for various audiences. For my purposes, I consider it "at random." For now I'm only interested in fixing formatting to static text, not from any data coming from a database table field.

When I get a chance I'll take a closer look at your code and try it out. But for now, it appears doing it manually is the easiest way to go.

Thanks for the ideas,
George


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 70 | Registered: April 27, 2012Report 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] Identifying a line heading or footing in a report.

Copyright © 1996-2020 Information Builders