Focal Point
Aligning comments

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

April 08, 2010, 04:13 PM
JJ
Aligning comments
Can anybody help me to figure this out?

If the comments are stored line by line as below:

  
COUNTRY            CAR             MODEL                BODYTYPE          LINE  COMMENTS
ENGLAND            JAGUAR          V12XKE AUTO          CONVERTIBLE        01    XXXX 
				                                      02    YYYY
				                                      03    ZZZZ 




How do I display output like this?
 
COUNTRY          CAR              MODEL                BODYTYPE                COMMENTS
ENGLAND          JAGUAR           V12XKE AUTO          CONVERTIBLE             XXXXYYYYZZZZ


Thank you,

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


WebFOCUS 8.2.05
Windows 2003
Excel, HTML, PDF
April 08, 2010, 04:40 PM
GinnyJakes
This isn't the most exciting example and I know that solutions have been posted before but I couldn't find them.
DEFINE FILE CAR
CARNAMETEXT/A1000V=LAST CAR||CAR;
END
TABLE FILE CAR
SUM CARNAMETEXT
BY COUNTRY
END

The trick is to use the variable format for the defined field.

Let us know if this works for you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
April 08, 2010, 04:59 PM
webFocus_reporter
Your Comment field seems to have carriage return and might be too long

First check with datatype .. if that is ok
try this

CCMOT/A4000=CAR.COMMENT;
CCMOT1/A4000=CTRAN(4000, CCMOT, 59, 32, CCMOT1);


WebFOCUS 7.6.X/7.7.X
Windows
all output
April 08, 2010, 06:05 PM
Waz
You will need to be careful of the size of the combined comment field.

How many comments could there be, and waht size is the field. If you go over 4000 characters, the you will have a problem.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 09, 2010, 04:23 AM
LIEMBURG
DEFINE?
April 09, 2010, 05:32 AM
Dan Satchell
In lieu of a comments column in the CAR file, I used the STANDARD equipment column because there are multiple entries per car.

DEFINE FILE CAR
 CNTRY_CAR/A26 = COUNTRY | CAR ;
 COMMENT/A1000V = IF CNTRY_CAR NE LAST CNTRY_CAR THEN STANDARD ELSE ( LAST COMMENT | ' ' | STANDARD );
END
-*
TABLE FILE CAR
 SUM LST.COMMENT AS 'COMMENTS'
 BY COUNTRY
 BY CAR
-* BY STANDARD
END



WebFOCUS 7.7.05
April 09, 2010, 06:50 AM
Kofi
It need have data all sorted using define else use compute?

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
April 09, 2010, 10:34 AM
JJ
Thank you to all of you for your replies. I used Dan's method which is perfectly matched with my requirement.

Thanks again!


WebFOCUS 8.2.05
Windows 2003
Excel, HTML, PDF