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] How to Display 2 Lines Data in One Row in WF

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to Display 2 Lines Data in One Row in WF
 Login/Join
 
Member
posted
Hello,

We have a requirement to display 3 fields in one row in report. One field is displayed in the left side, and 2 fields which are came in two lines in the right.
Like this:  
  B
A
  C


Is there a way to do that ? Thanks.

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


WebFOCUS 8105
Windows, All Outputs
 
Posts: 26 | Location: Hefei,China | Registered: March 27, 2016Report This Post
Platinum Member
posted Hide Post
Hi,

Can you please tell us that these 3 items in 3 rows of one columns or one row of three columns.


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
 
Posts: 103 | Registered: July 08, 2013Report This Post
Member
posted Hide Post
Hi Avinash,

I'm sorry that I cannot draw them in correct position here.

To simplify, B and C are merged in two lines, then merge them to A. So these 3 items are displayed in one row of one column.


WebFOCUS 8105
Windows, All Outputs
 
Posts: 26 | Location: Hefei,China | Registered: March 27, 2016Report This Post
Gold member
posted Hide Post
Hi S.G,

can you tell us more detail? you want to display column B+C+A as single column..?


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
 
Posts: 86 | Location: India | Registered: November 03, 2015Report This Post
Member
posted Hide Post
Hi Maran,

Just to mosaic these 3 items to single column.The display value is not changed.


WebFOCUS 8105
Windows, All Outputs
 
Posts: 26 | Location: Hefei,China | Registered: March 27, 2016Report This Post
Platinum Member
posted Hide Post
If A,B,C are columns then you can concatenate in a defined column.


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
 
Posts: 103 | Registered: July 08, 2013Report This Post
Gold member
posted Hide Post
Hi S.G,

You want output like this...?
  
+--------------+------------+-----------+---------------------+
|CURR_JOBCODE  | FIRST_NAME | LAST_NAME | EMP_NAME_WITH_JCOD  | 
+--------------+------------+-----------+---------------------+
| A07          | ALFRED     | STEVENS   | ALFRED STEVENS A07  | 
+--------------+------------+-----------+---------------------+
| B14          | MARY       | SMITH     | MARY SMITH B14      |  
+--------------+------------+-----------+---------------------+
| B03          | DIANE      | JONES     | DIANE JONES B03     |
+--------------+------------+-----------+---------------------+
| A01          | RICHARD    | SMITH     | RICHARD SMITH  A01  |  
+--------------+------------+-----------+---------------------+


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
 
Posts: 86 | Location: India | Registered: November 03, 2015Report This Post
Virtuoso
posted Hide Post
SG,

Try this:
  
-* File SG4.fex
TABLE FILE CAR
PRINT
     BODYTYPE AS '' OVER 
     DEALER_COST AS '' OVER 
     RETAIL_COST AS ''
BY  LOWEST COUNTRY
BY CAR
BY MODEL
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET BYDISPLAY ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
     PAGESIZE='A4', BORDER=LIGHT,
$
TYPE=DATA, BACKCOLOR=WHITE,
$
TYPE=DATA,
     COLUMN=N5,
     JUSTIFY=LEFT,
$
TYPE=DATA,
     COLUMN=N6,
     JUSTIFY=RIGHT,
$
TYPE=DATA,
     COLUMN=N4,
     JUSTIFY=RIGHT,
$
ENDSTYLE
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
You could also use the Alignment Grid and display everything in a SUBHEAD:
  
TABLE FILE CAR
PRINT 
     CAR.BODY.BODYTYPE NOPRINT 
     CAR.BODY.DEALER_COST NOPRINT 
     CAR.BODY.RETAIL_COST NOPRINT 
BY  LOWEST CAR.ORIGIN.COUNTRY NOPRINT 
BY  CAR.COMP.CAR NOPRINT 
BY  CAR.CARREC.MODEL NOPRINT 
     
ON CAR.CARREC.MODEL SUBHEAD
" <+0> <+0> <+0> <BODYTYPE"
"<COUNTRY<CAR<MODEL<DEALER_COST"
" <+0> <+0> <+0> <RETAIL_COST"
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SET BYDISPLAY ON 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
     PAGESIZE='A4',
$
TYPE=REPORT,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR='WHITE',
     BORDER-BOTTOM-COLOR='WHITE',
     BORDER-LEFT-COLOR='WHITE',
     BORDER-RIGHT-COLOR='WHITE',
$
TYPE=DATA,
     COLUMN=N1,
     BORDER-TOP=OFF,
     BORDER-BOTTOM=OFF,
     BORDER-LEFT=OFF,
     BORDER-RIGHT=OFF,
     BORDER-TOP-COLOR='WHITE',
     BORDER-BOTTOM-COLOR='WHITE',
     BORDER-LEFT-COLOR='WHITE',
     BORDER-RIGHT-COLOR='WHITE',
     BACKCOLOR='NONE',
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.889,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=2,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=2.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=RIGHT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.889,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=2,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=2.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=4,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.889,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=TEXT,
     ITEM=2,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=TEXT,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=2.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=RIGHT,
     WIDTH=1.000,
$
ENDSTYLE
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Hi Maran,

Thanks your reply!

For column EMP_NAME_WTTH_JCOD,its data is correct, but the display position is not what i want.
 
Below is an example:
___________________________________________________
             |             Field B    |
Other column |     Field A            | Other column
             |             Field C    | 
---------------------------------------------------



quote:
Originally posted by Maran:
Hi S.G,

You want output like this...?
  
+--------------+------------+-----------+---------------------+
|CURR_JOBCODE  | FIRST_NAME | LAST_NAME | EMP_NAME_WITH_JCOD  | 
+--------------+------------+-----------+---------------------+
| A07          | ALFRED     | STEVENS   | ALFRED STEVENS A07  | 
+--------------+------------+-----------+---------------------+
| B14          | MARY       | SMITH     | MARY SMITH B14      |  
+--------------+------------+-----------+---------------------+
| B03          | DIANE      | JONES     | DIANE JONES B03     |
+--------------+------------+-----------+---------------------+
| A01          | RICHARD    | SMITH     | RICHARD SMITH  A01  |  
+--------------+------------+-----------+---------------------+

This message has been edited. Last edited by: S.G,


WebFOCUS 8105
Windows, All Outputs
 
Posts: 26 | Location: Hefei,China | Registered: March 27, 2016Report This Post
Platinum Member
posted Hide Post
Hi,

Can you please try this

 DEFINE FILE CAR
AA/A200='<P align=left>'||'ABC'||'</P><P align=right>'||'XYZ'||'</P> <P align=left>'||'PQR'||'</P>';
END
TABLE FILE CAR
PRINT 
     AA
BY  CAR.COMP.CAR
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
     PAGESIZE='A4',
$
TYPE=REPORT,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR='WHITE',
     BORDER-BOTTOM-COLOR='WHITE',
     BORDER-LEFT-COLOR='WHITE',
     BORDER-RIGHT-COLOR='WHITE',
$
TYPE=DATA,
     COLUMN=N1,
     BACKCOLOR='NONE',
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N1,
     JUSTIFY=CENTER,
$
ENDSTYLE
END
 


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Member
posted Hide Post
Hi Daniel,

Thanks your suggestion!

I have tried and it work. However there is still a issue for display position.
 
For your code, below is an example:
____________________________________________________________
|            |           |                BODYTYPE         |
|COUNTRY     |CAR        |     DEALER_COST                 | 
|            |           |                RETAIL_COST      | 
------------------------------------------------------------


quote:
Originally posted by Danny-SRL:
SG,

Try this:
  
-* File SG4.fex
TABLE FILE CAR
PRINT
     BODYTYPE AS '' OVER 
     DEALER_COST AS '' OVER 
     RETAIL_COST AS ''
BY  LOWEST COUNTRY
BY CAR
BY MODEL
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET BYDISPLAY ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
     PAGESIZE='A4', BORDER=LIGHT,
$
TYPE=DATA, BACKCOLOR=WHITE,
$
TYPE=DATA,
     COLUMN=N5,
     JUSTIFY=LEFT,
$
TYPE=DATA,
     COLUMN=N6,
     JUSTIFY=RIGHT,
$
TYPE=DATA,
     COLUMN=N4,
     JUSTIFY=RIGHT,
$
ENDSTYLE
END


WebFOCUS 8105
Windows, All Outputs
 
Posts: 26 | Location: Hefei,China | Registered: March 27, 2016Report This Post
Member
posted Hide Post
Hi Neelima,

Thanks your method!

I try this and find it doesn't work for PDF output format. Besides these 3 items is not only left-aligned or right-aligned. They are similar displayed in center.

Below is a example:
 
____________________________________________________________
| column 1  |         column 2        |       column 3     |
|___________|_________________________|____________________|
|           |             abc         |                    |
| 1         |         XYZ             |        10.00       |
|           |             pqr         |                    |
------------------------------------------------------------
|           |             a           |                    |
| 2         |          XX             |        20.00       |
|           |             sdef        |                    |
------------------------------------------------------------

 


quote:
Originally posted by Neelima:
Hi,

Can you please try this

 DEFINE FILE CAR
AA/A200='<P align=left>'||'ABC'||'</P><P align=right>'||'XYZ'||'</P> <P align=left>'||'PQR'||'</P>';
END
TABLE FILE CAR
PRINT 
     AA
BY  CAR.COMP.CAR
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
     PAGESIZE='A4',
$
TYPE=REPORT,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR='WHITE',
     BORDER-BOTTOM-COLOR='WHITE',
     BORDER-LEFT-COLOR='WHITE',
     BORDER-RIGHT-COLOR='WHITE',
$
TYPE=DATA,
     COLUMN=N1,
     BACKCOLOR='NONE',
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     COLUMN=N1,
     JUSTIFY=CENTER,
$
ENDSTYLE
END
 


WebFOCUS 8105
Windows, All Outputs
 
Posts: 26 | Location: Hefei,China | Registered: March 27, 2016Report This Post
Virtuoso
posted Hide Post
Hi SG,

What do you mean by:
quote:
However there is still a issue for display position.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Hi Daniel,

These 3 items(column 2) are not only left-aligned or right-aligned. They are similar displayed in center.

Below is a example. Is there a way can do this? Thanks in advance!
 
____________________________________________________________
| column 1  |         column 2        |       column 3     |
|___________|_________________________|____________________|
|           |             abc         |                    |
| 1         |         XYZ             |        10.00       |
|           |             pqr         |                    |
------------------------------------------------------------
|           |             a           |                    |
| 2         |          XX             |        20.00       |
|           |             sdef        |                    |
------------------------------------------------------------
 



quote:
Originally posted by Danny-SRL:
Hi SG,

What do you mean by:
quote:
However there is still a issue for display position.


WebFOCUS 8105
Windows, All Outputs
 
Posts: 26 | Location: Hefei,China | Registered: March 27, 2016Report This Post
Virtuoso
posted Hide Post
SG,

Looking at your example, it seems then that the fields on lines 1 and 3 are LEFT-aligned but spaced further than line 2 where the field is RIGHT-aligned.

I think that you should try my second solution, using SUBHEAD, which I tweaked a bit.
Notice that the numeric fields were converted to alpha in order to accomplish right-justifying.
 
-* File SG5.fex
DEFINE FILE CAR
ADCOST/A12=FPRINT(DEALER_COST, 'D6', 'A12');
ARCOST/A12=FPRINT(RETAIL_COST, 'D6', 'A12');
END
TABLE FILE CAR
PRINT
     CAR.BODY.BODYTYPE NOPRINT
     CAR.BODY.ADCOST NOPRINT
     CAR.BODY.ARCOST NOPRINT
BY  LOWEST CAR.ORIGIN.COUNTRY NOPRINT
BY  CAR.COMP.CAR NOPRINT
BY  CAR.CARREC.MODEL NOPRINT

ON CAR.CARREC.MODEL SUBHEAD
" <+0> <+0> <+0> <BODYTYPE"
"<COUNTRY<CAR<MODEL<ADCOST"
" <+0> <+0> <+0> <ARCOST"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
     PAGESIZE='A4',
$
TYPE=REPORT,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR='WHITE',
     BORDER-BOTTOM-COLOR='WHITE',
     BORDER-LEFT-COLOR='WHITE',
     BORDER-RIGHT-COLOR='WHITE',
$
TYPE=DATA,
     COLUMN=N1,
     BORDER-TOP=OFF,
     BORDER-BOTTOM=OFF,
     BORDER-LEFT=OFF,
     BORDER-RIGHT=OFF,
     BORDER-TOP-COLOR='WHITE',
     BORDER-BOTTOM-COLOR='WHITE',
     BORDER-LEFT-COLOR='WHITE',
     BORDER-RIGHT-COLOR='WHITE',
     BACKCOLOR='NONE',
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.889,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=2,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=2.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=TEXT,
     ITEM=4,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=1,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.889,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=2,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=2.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=2,
     OBJECT=FIELD,
     ITEM=4,
     JUSTIFY=RIGHT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=TEXT,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=.889,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=TEXT,
     ITEM=2,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=TEXT,
     ITEM=3,
     JUSTIFY=LEFT,
     WIDTH=2.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=TEXT,
     ITEM=4,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
TYPE=SUBHEAD,
     BY=3,
     LINE=3,
     OBJECT=FIELD,
     ITEM=1,
     JUSTIFY=LEFT,
     WIDTH=1.000,
$
ENDSTYLE
END
 


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report 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] How to Display 2 Lines Data in One Row in WF

Copyright © 1996-2020 Information Builders