Focal Point
Listing values as multiple lines in the heading

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4591056313

January 13, 2009, 01:15 PM
ChannyS
Listing values as multiple lines in the heading
I have the following report:

 
TABLE FILE CAR
PRINT CAR 
WHERE COUNTRY NE 'JAPAN'
END
 


I would like to be able to have the countries that were used in the reported listed each on a separate row in the heading. I know that I could pass through the data two times and generate the list with HTML
tags that would force the issue in HTML but what about for PDF, EXCEL etc.

Any ideas of how best to do this?


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
January 13, 2009, 01:52 PM
j.gross
Rather than passing thru the data source twice, use HOLD. -- Use two verbs and "hold format focus", to isolate one record per key value in the upper segment, and the rest of your data (if you will list more than one record per key) in the lower segment.

Can you take it from there?


- Jack Gross
WF through 8.1.05
January 13, 2009, 01:57 PM
FrankDutch
Channy

There are a lot of ways to do this.
This is one....

SET HOLDLIST=PRINTONLY
DEFINE FILE CAR
CLINE/A25 WITH COUNTRY='"'||COUNTRY||'"';
TABLE FILE CAR
PRINT CLINE
WHERE COUNTRY NE 'JAPAN'
ON TABLE HOLD AS COUNTRIES
END
-RUN
TABLE FILE CAR
PRINT CAR 
HEADING
-INCLUDE COUNTRIES.FTM
WHERE COUNTRY NE 'JAPAN'
END


I did not test this (I'm not at the office), it is just an idea that came up.




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

January 13, 2009, 02:56 PM
ChannyS
Thanks for both of your ideas. Jack - I didn't get to test yours yet. I did test Frank's - needed minor code changes (posted below). It works well I'm just wondering how I can make use of this in an alignment grid which I'd like to use in the heading.

Modified working code:
  
SET HOLDLIST=PRINTONLY
DEFINE FILE CAR
CLINE/A25 WITH COUNTRY='"'||COUNTRY||'"'
END



TABLE FILE CAR
PRINT CLINE
WHERE COUNTRY NE 'JAPAN'
ON TABLE HOLD AS COUNTRIES
END
-RUN

TABLE FILE CAR
PRINT
     'CAR.COMP.CAR'
HEADING
-INCLUDE COUNTRIES
END



Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
January 13, 2009, 03:38 PM
FrankDutch
Nice to see that this works..... Smiler

Your additional question is a bit more complex. but why do you need a grid if you have each value on one line?

You can create the code lines for the grid more or less in the same way and include them.




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

January 13, 2009, 05:00 PM
ChannyS
I wanted the grid because these countries are really just one cell in the grid - there is alot of other stuff I need to print out and align in the heading.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv