Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Display title for each row/display head for each row
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Display title for each row/display head for each row
 Login/Join
 
Gold member
posted
Hi,

I need to display data as below

name cost location
Dave 456 MAL
name cost location
John 789 KAED
name cost location
Jack 389 YARJ

I need the title for the column to be printed for each row. Is it possible?

Thank you

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


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
 
Posts: 50 | Registered: August 04, 2009Reply With QuoteReport This Post
<FreSte>
posted
Try this:

TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
BY CAR
ON TABLE SET LINES 1
ON TABLE SET PAGE NOPAGE
END
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Nice!
I think I knew that at one time in life...
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi,

I tried it. It didn't print any header, below is what I got

ENGLAND JAGUAR 18,621
ENGLAND JENSEN 14,940
ENGLAND TRIUMPH 4,292
FRANCE PEUGEOT 4,631
ITALY ALFA ROMEO 16,235
ITALY MASERATI 25,000
JAPAN DATSUN 2,626
JAPAN TOYOTA 2,886
W GERMANY AUDI 5,063
W GERMANY BMW 49,500

What i was expecting was

COUNTRY CAR DEALER_COST
ENGLAND JAGUAR 18,621

COUNTRY CAR DEALER_COST
ENGLAND JENSEN 14,940

COUNTRY CAR DEALER_COST
ENGLAND TRIUMPH 4,292

COUNTRY CAR DEALER_COST
FRANCE PEUGEOT 4,631

COUNTRY CAR DEALER_COST
ITALY ALFA ROMEO 16,235

COUNTRY CAR DEALER_COST
ITALY MASERATI 25,000

COUNTRY CAR DEALER_COST
JAPAN DATSUN 2,626

COUNTRY CAR DEALER_COST
JAPAN TOYOTA 2,886

COUNTRY CAR DEALER_COST
W GERMANY AUDI 5,063

COUNTRY CAR DEALER_COST
W GERMANY BMW 49,500

Thank you


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
 
Posts: 50 | Registered: August 04, 2009Reply With QuoteReport This Post
Master
posted Hide Post
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
BY CAR
HEADING
" "
ON TABLE SET LINES 1
ON TABLE SET PAGE NOPAGE
END


Works for me. I added the HEADING to give the blank line. What RDBMS is your CAR deployed into (mine is the FOCUS)? Maybe that's the discrepency?

Maybe:
TABLE FILE CAR
PRINT
*
ON TABLE HOLD AS MY_CAR FORMAT FOCUS
END

TABLE FILE MY_CAR
SUM DEALER_COST
BY COUNTRY
BY CAR
HEADING
" "
ON TABLE SET LINES 1
ON TABLE SET PAGE NOPAGE
END


- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
Gold member
posted Hide Post
quote:
TABLE FILE CAR PRINT * ON TABLE HOLD AS MY_CAR FORMAT FOCUS END TABLE FILE MY_CAR SUM DEALER_COST BY COUNTRY BY CAR HEADING " " ON TABLE SET LINES 1 ON TABLE SET PAGE NOPAGE END


Could this be a version issue I am not getting it.


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
 
Posts: 50 | Registered: August 04, 2009Reply With QuoteReport This Post
<FreSte>
posted
quote:

ENGLAND JAGUAR 18,621
ENGLAND JENSEN 14,940
ENGLAND TRIUMPH 4,292
FRANCE PEUGEOT 4,631
ITALY ALFA ROMEO 16,235
ITALY MASERATI 25,000
JAPAN DATSUN 2,626
JAPAN TOYOTA 2,886
W GERMANY AUDI 5,063
W GERMANY BMW 49,500


In the example above it looks like you're printing the records to a HOLD-file (format alpha).
What output format do you need and what is it what you need to do with it ?
 
Reply With QuoteReport This Post
Expert
posted Hide Post
Consider this:
DEFINE FILE CAR
HEADER1/A7 = 'COUNTRY' ;
HEADER2/A3 = 'CAR' ;
HEADER3/A5 = 'MODEL' ;
HEADER4/A5 = 'DCOST' ;
END
TABLE FILE CAR
SUM HEADER1 AS '' HEADER2 AS '' HEADER3 AS '' HEADER4 AS '' 
OVER COUNTRY AS '' CAR AS '' MODEL AS '' DCOST AS '' 
BY MODEL NOPRINT
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
TYPE=REPORT, COLUMN=HEADER1, STYLE=BOLD,$
TYPE=REPORT, COLUMN=HEADER2, STYLE=BOLD,$
TYPE=REPORT, COLUMN=HEADER3, STYLE=BOLD,$
TYPE=REPORT, COLUMN=HEADER4, STYLE=BOLD,$
ENDSTYLE
END
Which results in this (only a few lines are displayed here):

COUNTRY CAR MODEL      DCOST
W GERMANY AUDI 100 LS 2 DOOR AUTO 5,063
COUNTRY CAR MODEL      DCOST
ITALY ALFA ROMEO 2000 4 DOOR BERLINA 4,915
COUNTRY CAR MODEL      DCOST
ITALY ALFA ROMEO 2000 GT VELOCE 5,660
COUNTRY CAR MODEL      DCOST
ITALY ALFA ROMEO 2000 SPIDER VELOCE 5,660
COUNTRY CAR MODEL      DCOST
W GERMANY BMW 2002 2 DOOR 5,800


Sorry, I shouuld have used the EMPDATA file or something closer to a NAME related source...

Anyway, I hope this helps...
 
Posts: 3066 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Or, you could set up an incremental counter (COMPUTE or DEFINE) which would be used as a reference in a SUBHEAD / (WHEN counter ne last counter (which would be always true) and, of course your SUBHEAD would be something like "COUNTRY CAR MODEL DCOST "... Or...
 
Posts: 3066 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
The version in the signature is WebFocus 5.2.5...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1963 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Tom: Is the suggestion stated in my post of Sep 15 2011 13:35 or 13:45 not available on 5.2.5?
 
Posts: 3066 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Just tested in WF 5.2.4

TABLE FILE CAR
PRINT *
ON TABLE HOLD AS MY_CAR FORMAT FOCUS
END
TABLE FILE MY_CAR
SUM DEALER_COST
BY COUNTRY
BY CAR
HEADING
" "
ON TABLE SET LINES 1
ON TABLE SET PAGE NOPAGE
END 


Output is OK. From the command line.

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
ENGLAND     JAGUAR                 18,621

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
ENGLAND     JENSEN                 14,940

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
ENGLAND     TRIUMPH                 4,292

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
FRANCE      PEUGEOT                 4,631

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
ITALY       ALFA ROMEO             16,235

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
ITALY       MASERATI               25,000

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
JAPAN       DATSUN                  2,626

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
JAPAN       TOYOTA                  2,886

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
W GERMANY   AUDI                    5,063

COUNTRY     CAR               DEALER_COST
-------     ---               -----------
W GERMANY   BMW                    49,500


You may be right, it could be a version issue.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6253 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
quote:
Originally posted by Doug:
Consider this:
DEFINE FILE CAR
HEADER1/A7 = 'COUNTRY' ;
HEADER2/A3 = 'CAR' ;
HEADER3/A5 = 'MODEL' ;
HEADER4/A5 = 'DCOST' ;
END
TABLE FILE CAR
SUM HEADER1 AS '' HEADER2 AS '' HEADER3 AS '' HEADER4 AS '' 
OVER COUNTRY AS '' CAR AS '' MODEL AS '' DCOST AS '' 
BY MODEL NOPRINT
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
GRID=OFF,$
TYPE=REPORT, COLUMN=HEADER1, STYLE=BOLD,$
TYPE=REPORT, COLUMN=HEADER2, STYLE=BOLD,$
TYPE=REPORT, COLUMN=HEADER3, STYLE=BOLD,$
TYPE=REPORT, COLUMN=HEADER4, STYLE=BOLD,$
ENDSTYLE
END
Which results in this (only a few lines are displayed here):

COUNTRY CAR MODEL      DCOST
W GERMANY AUDI 100 LS 2 DOOR AUTO 5,063
COUNTRY CAR MODEL      DCOST
ITALY ALFA ROMEO 2000 4 DOOR BERLINA 4,915
COUNTRY CAR MODEL      DCOST
ITALY ALFA ROMEO 2000 GT VELOCE 5,660
COUNTRY CAR MODEL      DCOST
ITALY ALFA ROMEO 2000 SPIDER VELOCE 5,660
COUNTRY CAR MODEL      DCOST
W GERMANY BMW 2002 2 DOOR 5,800


Sorry, I shouuld have used the EMPDATA file or something closer to a NAME related source...

Anyway, I hope this helps...


Thanks Doug. This did help


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
 
Posts: 50 | Registered: August 04, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Display title for each row/display head for each row

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.