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] indentation

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] indentation
 Login/Join
 
Member
posted
I have seemingly the simplest task, but I can't get it done. I want to conditionally indent certain rows. Something like the 2 rows in the middle in the following example:

JAGUAR 12000
JENSEN 0
TRIUMPH 0
PEUGEOT 0


I read some other posts in the forum. All of them suggest adding leading spaces to the value. However, I can't do that because later I need to add drill-down to the first column of the detail rows, and having the leading spaces in the drill-down hyperlinks make the report look ugly.

Are there any other ways to do indentation?

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


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 28 | Registered: January 19, 2012Report This Post
Expert
posted Hide Post
Not knowing the layout of the report, its difficult to suggest something.

But have you thought about adding a blank column prior to the field to be indented ?

Another option is to create the drilldoen in the field with some html and javascript.

There will be many other ways to do this as well.


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
Member
posted Hide Post
What about using subhead for the first column?


WebFOCUS 8.1.0.5m
 
Posts: 26 | Registered: October 09, 2007Report This Post
Gold member
posted Hide Post
conditional justification? You could right justify the columns you want indented?


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
Expert
posted Hide Post
Something like this?
TABLE FILE CAR
SUM DCOST NOPRINT
BY COUNTRY NOPRINT
ON COUNTRY SUBFOOT 
"<COUNTRY> <DCOST>"
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE OFF
ON TABLE SET STYLE *
GRID=OFF, BORDER=OFF, SQUEEZE=OFF,$
TYPE=SUBFOOT, ITEM=1, OBJECT=FIELD, WRAP=1.50, POSITION=0.20, JUSTIFY=LEFT,  COLOR=RED,  WHEN = COUNTRY EQ 'FRANCE',$
TYPE=SUBFOOT, ITEM=2, OBJECT=FIELD, WRAP=1.50, POSITION=0.10, JUSTIFY=RIGHT, COLOR=BLUE, WHEN = COUNTRY EQ 'FRANCE',$
TYPE=SUBFOOT, ITEM=1, OBJECT=FIELD, WRAP=1.50, POSITION=0.00, JUSTIFY=LEFT,  COLOR=BLUE, WHEN = COUNTRY NE 'FRANCE',$
TYPE=SUBFOOT, ITEM=2, OBJECT=FIELD, WRAP=1.50, POSITION=0.25, JUSTIFY=RIGHT, COLOR=BLUE, WHEN = COUNTRY NE 'FRANCE',$
ENDSTYLE
END
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Or add a CSS-class conditionally, assuming you're using HTML output.
TABLE FILE CAR
SUM DCOST
  COMPUTE ODD/I1 = IF LAST ODD EQ 1 THEN 0 ELSE 1; NOPRINT
BY COUNTRY
ON TABLE SET HTMLCSS OFF
ON TABLE SET CSSURL 'car.css'
ON TABLE SET PAGE OFF
ON TABLE SET STYLE *
GRID=OFF, BORDER=OFF, SQUEEZE=OFF,$
TYPE=DATA, COLUMN=DCOST, CLASS=odd, WHEN=ODD EQ 1,$
TYPE=DATA, COLUMN=DCOST, CLASS=even, WHEN=ODD EQ 0,$
ENDSTYLE
END


With the contents of car.css being:
.odd { margin-left: 0; }
.even { margin-left: 4em; }


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
Member
posted Hide Post
I think this will work for you

DEFINE FILE CAR
CAR1/A16=IF CAR EQ 'JENSEN' OR 'TRIUMPH' THEN ' ' ELSE CAR;
CAR2/A16=IF CAR NE 'JENSEN' OR 'TRIUMPH' THEN ' ' ELSE CAR;
END
TABLE FILE CAR
SUM SALES
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY CAR1 AS 'CAR'
BY CAR2 AS ''
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.20000,
TOPMARGIN=0.200000,
RIGHTMARGIN=0.20,
BOTTOMMARGIN=0.20,
LEFTGAP=0.0,
RIGHTGAP=0.07,
BOTTOMGAP=0.05,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='COURIER NEW',
SIZE=9,
$
TYPE=REPORT,
COLUMN=P2,
POSITION = .2,

$
TYPE=DATA,
COLUMN=P1,
FOCEXEC=car2( \
CAR=N1 \
),
WHEN = CAR1 NE ' ',
$
TYPE=DATA,
COLUMN=P2,
FOCEXEC=car2( \
CAR=N1 \
),
WHEN = CAR2 NE ' ',
$
ENDSTYLE
END
-RUN
 
Posts: 17 | Location: Colorado, USA | Registered: January 22, 2010Report This Post
Member
posted Hide Post
Thanks for all the useful suggestions. Bethanne's idea works, but my actual report is quite wide, and I need to save some space from creating a new column. Doug's subhead idea also works, but my actual report has an ACROSS column, and I can't get the subhead to work with that and display data for each across value. In the end, I am going with Wep5622's idea of using CSS. I never worked with CSS in WebFocus before, so this is a great way for me to get started. I did have to change one thing: I couldn't get "margin-left" to work, so I changed it to "padding-left".


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 28 | Registered: January 19, 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] indentation

Copyright © 1996-2020 Information Builders