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     [CLOSED] best way to swap row to columns

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] best way to swap row to columns
 Login/Join
 
Member
posted
I have a regular row column report that works fine, and I've been asked to take that data and create a 'worksheet' output.
This task is essentially taking all fields for a single record and creating a 2 column list of the field and it's data value.

In the past, I've used the subfoot/subhead commands to accomplish this, but I now require distinct columns in the output (the request asks for 3 additional columns that will have a column heading, but will contain no report data.

I've gone through on-line help, but placeholders <+0> and positionmarkers don't create the columns the way I expected
(blank spaces seem to disappear and I can't even get column headings to line up)

ex:
"last name : "first name : "address :

Is there an easier way to accomplish this task?

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6.9
Windows
all output (Excel, HTML, PDF)
 
Posts: 28 | Registered: April 27, 2010Report This Post
Virtuoso
posted Hide Post
Make a dummy column with how many spaces you need.
DEFINE FILE WHATEVER
SP/A1 = HEXBYT(160, 'A1');
SP02/A5 = SP|SP|SP|SP|SP;
LNAME/A5 = SP02;
FNAME/A5 = SP02;
ADD/A5 = SP02;
END
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
are you alluding to maybe there's a difference putting 5 spaces in the string Vs. a field containing 5 spaces?


WebFOCUS 7.6.9
Windows
all output (Excel, HTML, PDF)
 
Posts: 28 | Registered: April 27, 2010Report This Post
Master
posted Hide Post
Got a code example of what your looking to do? Would ACROSS work?



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Virtuoso
posted Hide Post
Will OVER do the trick?

PRINT
 LASTNAME  OVER
 FIRSTNAME OVER
 ADDRESS


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
I've looked at some older reports to see how other report writers have handled this. on method is below. Essentially a report of all subfoots.

The other method is to DEFINE each line of output (manually padding fields to line columns up) and then outputting each record by id by linenumber



code
-*
-*
-* FORMAT THE DATA INTO A WORKSHEET
-*
-*

TABLE FILE DATA_TO_FORMAT
BY CS_STUDENT_ID NOPRINT
ON CS_STUDENT_ID PAGE-BREAK AND SUBFOOT
-*ON CS_STUDENT_ID SUBFOOT
"Dependent Student Verification Checklist "
-*""
-*""
-*""
"Student Name: "Student ID: "IASU: Official/Yes or Incomplete "
-*""
-*""
" Match = Y Correction"
" NoMatch = Reqd? "
"FASI Isir Data DRT EnterValue (Y or N) "
"---------------------------------------- ---------- ---------- ---------- ----------"



"Dependency "Selected By CPS? (Y or N) "Verification Group


ON TABLE SET PAGE-NUM OFF
-*ON TABLE SET ONLINE-FMT PDF

ON TABLE SET STYLESHEET *

TYPE = REPORT, GRID=OFF, SQUEEZE=OFF, $
TYPE=SUBFOOT, FONT = 'ARIAL', SIZE = 10 , $
-*-GOTO SKIP1
-* FIRST FIELD - sets up columns and their widths
TYPE = SUBFOOT, ITEM=1, JUSTIFY = LEFT, WIDTH=3.00, $
-* FIRST-SECOND GAP
TYPE = SUBFOOT, ITEM=2, JUSTIFY = LEFT, WIDTH=2.00, $
-* SECOND FIELD
TYPE = SUBFOOT, ITEM=3, JUSTIFY = LEFT, WIDTH=1.50, $
-* SECOND - THIRD GAP
TYPE = SUBFOOT, ITEM=4, JUSTIFY = LEFT, WIDTH=1.50, $
-* SECOND - THIRD GAP
TYPE = SUBFOOT, ITEM=5, JUSTIFY = LEFT, WIDTH=1.50, $
-*
TYPE = SUBFOOT, LINE = 1, JUSTIFY = CENTER, STYLE=BOLD, SIZE=12, $
-* 3 BL
TYPE = SUBFOOT, LINE = 5, JUSTIFY = LEFT, STYLE=BOLD, SIZE=10, $
TYPE = SUBFOOT, LINE = 6, JUSTIFY = LEFT, STYLE=BOLD, SIZE=10, $
TYPE = SUBFOOT, LINE = 7, JUSTIFY = LEFT, STYLE=BOLD, SIZE=10, $
-* 2BL
-*TYPE = SUBFOOT, LINE = 8, JUSTIFY = CENTER, $
-*TYPE = SUBFOOT, LINE = 9, JUSTIFY = CENTER, $
-*
TYPE = SUBFOOT, LINE = 10, FONT = 'SYSTEM', COLSPAN = 5, HEADALIGN = INTERNAL, JUSTIFY = LEFT, $
TYPE = SUBFOOT, LINE = 11, FONT = 'SYSTEM', COLSPAN = 5, HEADALIGN = INTERNAL, JUSTIFY = LEFT, $
TYPE = SUBFOOT, LINE = 12, FONT = 'SYSTEM', COLSPAN = 5, HEADALIGN = INTERNAL, JUSTIFY = LEFT, $
TYPE = SUBFOOT, LINE = 13, FONT = 'SYSTEM', COLSPAN = 5, HEADALIGN = INTERNAL, JUSTIFY = LEFT, $

TYPE = SUBFOOT, LINE = 14, FONT = 'SYSTEM', COLSPAN = 1, HEADALIGN = BODY, JUSTIFY = LEFT, $
TYPE = SUBFOOT, LINE = 15, FONT = 'SYSTEM', COLSPAN = 2, HEADALIGN = BODY, JUSTIFY = LEFT, $

TYPE = SUBFOOT, LINE = 15, FONT = 'SYSTEM', COLSPAN = 5, HEADALIGN = INTERNAL, JUSTIFY = LEFT, $
TYPE = SUBFOOT, LINE = 16, FONT = 'SYSTEM', COLSPAN = 5, HEADALIGN = INTERNAL, JUSTIFY = LEFT, $

ENDSTYLE
-*ON TABLE PCHOLD FORMAT &FRM
ON TABLE PCHOLD FORMAT HTML
END


/code


WebFOCUS 7.6.9
Windows
all output (Excel, HTML, PDF)
 
Posts: 28 | Registered: April 27, 2010Report This Post
Virtuoso
posted Hide Post
Here is an easy way. It may not be what you are looking for, but it allows you by using an &variable to output a row or column report.
-* File AL01.fex
-REPEAT #AL FOR &I FROM 1 TO 2;
-SET &OP=DECODE &I(1 AND 2 OVER);
LET OP=&OP
TABLE FILE CAR
PRINT 
COUNTRY OP 
CAR OP
BODYTYPE OP
SALES
END
-#AL


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
Master
posted Hide Post
I meant OVER, not ACROSS.. doh!



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report 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     [CLOSED] best way to swap row to columns

Copyright © 1996-2020 Information Builders