Focal Point
[CLOSED] A Row to be available again and again.

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

October 29, 2010, 08:37 AM
Ramkumar - Webfous
[CLOSED] A Row to be available again and again.
My Data Looks Like....



My Report should look like...




Expln :
The Data value 'element name' is present in the table only once with no area code. But the Report's Data should have this as the First row for every area code....

For a simulation this is only one row. But actually, there are lot of rows, that has to be present before start of every area's Data.

I tried to Define a new Field, But no conditions worked out....

How to go about this ?

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


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
October 29, 2010, 10:50 AM
Gobinath Velusamy
Hi Ram

Use the Area code as the Loop element . so based on the area code split the report and join the reports vertically .


Thanks
Gobinath Velusamy


WebFOCUS 7610
Windows
October 29, 2010, 11:00 AM
Hua
SUBHEAD on the Area Code might be the solution.
TABLE FILE CAR
PRINT 
	CAR AS ''
	COUNTRY
	SALES
BY COUNTRY NOPRINT
ON COUNTRY SUBHEAD 
" "
"CAR"
END  



Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
October 29, 2010, 02:42 PM
Dan Satchell
A multi-verb request might work - but only if 'element name' is always the first record in the table/major sort group. For example:

TABLE FILE <filename>
 SUM FST.PAGE_ELEMENT NOPRINT
 [BY <major sort group>]

 PRINT PAGE_ELEMENT AREA_CODE VALUE_CODE
 [BY <major sort group> NOPRINT]
 BY AREA_CODE NOPRINT
 BY PAGE_ELEMENT NOPRINT
 ON AREA_CODE SUBHEAD
  " "
  "<FST.PAGE_ELEMENT"
END



WebFOCUS 7.7.05
October 31, 2010, 04:18 AM
Alan B
Assuming that 'element name' is not always first, data is never that obliging, Dan's idea can be expanded to:

DEFINE FILE CAR
HEADER/A20 = IF COUNTRY EQ 'ITALY' THEN COUNTRY ELSE ' ';
END
TABLE FILE CAR
SUM 
     MAX.HEADER NOPRINT
PRINT 
     COMPUTE TEXT/A20 = IF COUNTRY NE 'ITALY' THEN COUNTRY ELSE ' ';
     SEATS
     SALES
BY SEATS NOPRINT
ON SEATS SUBHEAD
"<MAX.HEADER"
WHERE TOTAL COUNTRY NE 'ITALY';
END

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
November 02, 2010, 03:37 AM
Ramkumar - Webfous
Hi All,

Thank you for all your kind replies.

But to say exactly, This is not only one row and will not appear at the First row every time.

There will be lot of such rows, which has to be merged with a Sub result set.


Is it possible to add area code 01,02, 03 to the element name row ?

I mean the output can be Like...




i.e, The Rows with empty Area Code in the Data has to be available for all area codes, displaying the area code.

Is there a way to do this using, seperate Table file requests and doing a match or something ?


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
November 02, 2010, 08:20 AM
GamP
What I would try to do is to first extract all rows that have no area code, bracket the data in double quote marks and put that into a hold file. Then create the real report, without all records that have no area code and do a subhead on area code where you do a -INCLUDE of the held data. It might work.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 02, 2010, 09:24 AM
Ramkumar - Webfous
Hi Gamp,

Thanks for the Reply...

But Subhead is not an Opt solution, as This is not going be a Single row, Which need to come in Subheading.



Let me rephrase this into another way.

-SET &INAREA_CODE = '''AA'' OR ''BB'' OR ''CC''';

TABLE FILE CAR
PRINT
DST.COUNTRY
ON TABLE HOLD AS HLD1
END



For every entry in &INAREA_CODE All the rows in HLD1 has to be replicated.

I need the output like...



I hope I have made it clear.

How to go about this ?


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
November 02, 2010, 09:26 AM
Ramkumar - Webfous
Starting a Fresh Thread.on this...


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5