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] Incremental Row Counter as the Leftmost Column on a Matrix Report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Incremental Row Counter as the Leftmost Column on a Matrix Report
 Login/Join
 
Member
posted
Firstly i would like to introduce myself to the forum as a newposter and thank you all of you guys for helping and supporting each other.

Problem description:
I want to have an incremental row counter as the leftmost column on my report output. The report has BY and ACROSS fields.
I searched extensively on the forum, i found many posts regarding 'row count' but some i could not understand ( Webfocus newbie) and others
gave me some useful tips that unfortunately didn't do the trick.

Some of the things i tried:

- I tried to use a compute field but report painter doesn't let me put a SUM field before a BY field.

-I tried the list sequence command.

-I tried to use stylesheets and i got error: (FOC3220) STYLESHEETS CAN NOT SEQUENCE 'ACROSS' OR 'OVER' COLUMNS
If i go to 'Source view' and i delete the across column which is automatically sequenced in stylesheet then all is ok! But the
next time i switch to GUI view the across column is automatically sequenced again. i.e.
TYPE=REPORT,
COLUMN=N4,
SEQUENCE=745,
It is crucial that i can access report painter Gui without limiting the already achieved functionality.

-I tried to use a hold file but messed it up



More accurate problem description:


The following code

 
TABLE FILE CAR
LIST
     CAR
BY COUNTRY
BY MODEL
ACROSS SEATS
END
 



produces this Output

but what i really want is Desired_output

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


WebFocus 7.69
Windows 2003
Db2 for Windows 9.5
 
Posts: 9 | Registered: November 16, 2009Report This Post
Virtuoso
posted Hide Post
That's a common problem with the GUI. There are lot's of things that you can do in the code that the GUI doesn't understand so it just throws it out or makes a best guess as to what you "really" wanted to do. Probably the easiest way to get what you want is to use a multiverb set - the first to get the counter, the second to get the rest of the report.
TABLE FILE CAR
SUM
     COMPUTE ROWCNT/I9 = LAST ROWCNT + 1;
BY COUNTRY
BY MODEL
PRINT
     CAR
BY COUNTRY
BY MODEL
ACROSS SEATS
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=REPORT, COLUMN=ROWCNT, SEQUENCE=1,$
ENDSTYLE
END


However, if you open this in the GUI the sequence gets thrown out.

Probably something you're going to have to live with to get what you need.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
Darin Lee thank you for your insights.

As i said customer needs access to the GUI, so imagine if every time they open up the report in report painter they have to modify code.

I understand and i trust you that this limitation is sth is have to come to terms with to achieve what i want.

It is just one of those important project requirements...so i have to find a way


WebFocus 7.69
Windows 2003
Db2 for Windows 9.5
 
Posts: 9 | Registered: November 16, 2009Report This Post
Virtuoso
posted Hide Post
Vas,

The following was created with the GUI:
  
TABLE FILE CAR
SUM 
     COMPUTE RC/I3 = RC + 1;
BY COUNTRY
BY CAR
SUM 
     SALES
BY COUNTRY
BY CAR
ACROSS SEATS
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=FOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=SUBHEAD,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBFOOT,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBTOTAL,
     BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
     SIZE=9,
$
TYPE=ACROSSTITLE,
     STYLE=BOLD,
$
TYPE=GRANDTOTAL,
     BACKCOLOR=RGB(210 210 210),
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SEQUENCE=2,
$
TYPE=REPORT,
     COLUMN=N2,
     SEQUENCE=3,
$
TYPE=REPORT,
     COLUMN=N3,
     SEQUENCE=1,
$
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
Hey Danny!

Your post has helped me answer my question!!! Good One

When i first read your post i noticed that you use stylesheets too! So i was quite sure that as soon as i would open it up in GUI for a second time, the ordering of the columns would be changed again. Being very close to post that this doesn't work i decided to create a new report with your code in, just to confirm. To my surprise the stylesheet formatting was kept!

After digging in a bit more... Report->Options->Output->Custom Field Placement does the trick.



By the way, another way of implementing that it worked for me, was to make the 'outer by field' RANKED. This creates the incremental row counter that i want.
Not sure though what would the effect of declaring a 'by field' as Ranked be.
Any Advice on this?


People i really want to thank you all, those who have read this post and you that have contributed.
Thanks a lot Wink


WebFocus 7.69
Windows 2003
Db2 for Windows 9.5
 
Posts: 9 | Registered: November 16, 2009Report This Post
Virtuoso
posted Hide Post
Vas,

When you declare "RANKED" on a by field, the numbering will be incremented each time the field changes value. So if you have groups, you won't have a line numbering.

As for Custom field placement, you can do it easily by right-clicking the field you want to move and dragging it.


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] Incremental Row Counter as the Leftmost Column on a Matrix Report

Copyright © 1996-2020 Information Builders