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     displaying items line by line under a column

Read-Only Read-Only Topic
Go
Search
Notify
Tools
displaying items line by line under a column
 Login/Join
 
Silver Member
posted
Hi,

Right now i am getting the following from database stored procedure:

Key_ID  Username  Owner_Type  Status
~~~~~  ~~~~~~  ~~~~~~~~  ~~~~
1001      abcd        Owner        Closed
1001      efgh        Manager        Open
1002      wxyz        Owner        Open
1002      pqrs        Manager        Closed
...

My requirement is to print like this:

Key_ID  Owner_Name  Owner_Status
~~~~~  ~~~~~~~~  ~~~~~~~~~~
1001      abcd            Closed
            efgh              Open
1002      wxyz            Open
            pqrs              Closed

A 'BY' on the 'Key_ID' field will do it, but due to the complexity of the report and technical difficulties, we are not printing the column headers under PRINT, instead printing the column headers under HEADING and column values under a column SUBHEAD.

I can concatenate the Owners with a delimiter like what i am able to do now is below:

Key_ID  Owner_Name    Owner_Status
~~~~~  ~~~~~~~~    ~~~~~~~~~~
1001      abcd ; efgh       Closed ; Open
1002      wxyz ; pqrs       Open ; Closed

I can concatenate with any delimiter but the delimiter i want is a new line which i suppose is not possible. Is there any other way to acheive this?
I hope i am clear on the requirement.
Any help is much appreciated.

Output Format: PDF / EXL2K

Thanks
Dharma


dharma
------------------
WF v 7.1.1
OS - Win XP
Output: PDF, EXL2K
 
Posts: 41 | Location: Boston | Registered: August 17, 2005Report This Post
Virtuoso
posted Hide Post
Something like

TABLE FILE XXX
PRINT OWNERNAME
      STATUS
BY KEY_ID
BY STATUS NOPRINT
END


rather basic...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
If the output is html only, you could put in the '< br >' tags to skip to a new line. This will then start at the beginning of the cell, which might be the beginning of the line.
If you also need it for pdf, then you'll have to find out what the pdf-code for new line is, so you can put that code in.

Hope this helps, I haven't tested it ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
Thanks for the replies.
Frank, as i have already mentioned, a simple BY will do it, but i am not printing the columns directly under PRINT, but rather doing it under HEADING and SUBHEAD.
GamP, as i have mentioned, i need it for PDF and EXL2K. i need kind of a substitute for new line character in PDF and EXL2K. or may be a workaround if that is not possible.

Any help is appreciated.


dharma
------------------
WF v 7.1.1
OS - Win XP
Output: PDF, EXL2K
 
Posts: 41 | Location: Boston | Registered: August 17, 2005Report This Post
Virtuoso
posted Hide Post
Dharma

Please try to build an example report on the CAR database and post it.
I do not understand what you mean by "doing it under HEADING and SUBHEAD"

You might be able to create a dummy report (with excel), make a snapshot and post it as an image here.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Master
posted Hide Post
TABLE FILE CAR
HEADING
"CAR COUNTRY MODEL"
PRINT
CAR AS ''
COUNTRY AS ''
MODEL AS ''
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=HEADING,COLSPAN=3,$
TYPE=HEADING,LINE=1,ITEM=1,COLSPAN=1,$
TYPE=HEADING,LINE=1,ITEM=2,COLSPAN=1,$
TYPE=HEADING,LINE=1,ITEM=3,COLSPAN=1,$
ENDSTYLE
END
-EXIT

Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Silver Member
posted Hide Post
TABLE FILE TEST
BY KEY_ID NOPRINT
BY OWNERNAME NOPRINT
BY STATUS NOPRINT
END

-* Displaying column headers
HEADING
"Key<+0>Owner"
"ID<+0>Name<+0>Status"

-* displaying column values
ON KEY_ID SUBHEAD
"<KEY_ID<OWNERNAME<STATUS"

ON TABLE SET STYLE *
TYPE=SUBHEAD, BY=KEY_ID, LINE=1, OBJECT=FIELD, ITEM=1, WRAP=1.4, $
TYPE=SUBHEAD, BY=KEY_ID, LINE=1, OBJECT=FIELD, ITEM=2, WRAP=2.1, $
TYPE=SUBHEAD, BY=KEY_ID, LINE=1, OBJECT=FIELD, ITEM=3, WRAP=1.5,$

TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=1, WRAP=1.4, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=2, WRAP=2.1, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$

TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, WRAP=1.4, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=2, WRAP=2.1, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=3, WRAP=1.5, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$

-* Styling becomes easy like positioning and wrapping of columns after a particular length, when we display the column values in subhead field like the above, especially for output to be in PDF format.

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


dharma
------------------
WF v 7.1.1
OS - Win XP
Output: PDF, EXL2K
 
Posts: 41 | Location: Boston | Registered: August 17, 2005Report This Post
Guru
posted Hide Post
Take a look at this

  
APP PATH TESTING

FILEDEF SAM_DATA DISK D:\IBI\APPS\TESTING\SAM_DATA.FTM

-* Sort the data in the order you want
-* Determine which KEY IDs to hide
-* Hold in hold file
TABLE FILE SAM_DATA
PRINT
     USERNAME
     COMPUTE HIDE_KEY/A1 = IF KEY_ID EQ LAST KEY_ID THEN 'Y' ELSE 'N';
BY KEY_ID
BY USERNAME NOPRINT
BY OWNERNAME
BY STATUS
ON TABLE HOLD AS HOLD1
END

-* Create defined field with data that needs to be displayed in subhead 
DEFINE FILE HOLD1
SUB_KEY/A100 = KEY_ID | USERNAME | STATUS;
END


TABLE FILE HOLD1
PRINT
     SUB_KEY NOPRINT
     HIDE_KEY NOPRINT
BY
     KEY_ID NOPRINT
BY
     SUB_KEY NOPRINT

ON SUB_KEY SUBHEAD 
"<KEY_ID<USERNAME<STATUS"
HEADING
"Key<+0>Owner"
"ID<+0>Name<+0>Status"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     LEFTMARGIN=0.250000,
     RIGHTMARGIN=0.250000,
     TOPMARGIN=0.250000,
     BOTTOMMARGIN=0.250000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=10, COLOR='BLACK', STYLE=NORMAL, RIGHTGAP=0.125000, $
TYPE=SUBHEAD, BY=SUB_KEY, LINE=1, OBJECT=FIELD, ITEM=1, WRAP=1.4, $
TYPE=SUBHEAD, BY=SUB_KEY, LINE=1, OBJECT=FIELD, ITEM=1, WRAP=1.4, COLOR='WHITE', WHEN= HIDE_KEY EQ 'Y', $
TYPE=SUBHEAD, BY=SUB_KEY, LINE=1, OBJECT=FIELD, ITEM=2, WRAP=2.1, $
TYPE=SUBHEAD, BY=SUB_KEY, LINE=1, OBJECT=FIELD, ITEM=3, WRAP=1.5, $

TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=1, WRAP=1.4, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=2, WRAP=2.1, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$

TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, WRAP=1.4, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=2, WRAP=2.1, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=3, WRAP=1.5, JUSTIFY=LEFT,BACKCOLOR=RGB(210 210 210),$
ENDSTYLE
END


It looks like the results you want however a blank line is produced after each subhead.

JG provides a solution to this problem in the following post:
[SOLVED] How to remove space between subheads/subfoots in PDF ?


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report 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     displaying items line by line under a column

Copyright © 1996-2020 Information Builders