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     dense data or nodata
Go
New
Search
Notify
Tools
Reply
  
dense data or nodata
 Login/Join
 
Member
posted
Hey Everyone,

I've been trying for 2 days to get a report to work, and I hope someone here can help me out.

I need to dense data in a report. I'm using the nodata, and it works fine for the first set of data, but when I add another by field, it only denses the first by field.

What I need to end up with is something like this.

country bodytype car
england convertible jaguar
sedan jaguar
hardtop triumph
coupe NONE
roadster NONE
france convertible NONE
sedan peugeot
hardtop NONE
coupe NONE
roadster NONE

Any ideas would be greatly appreciated.
 
Posts: 15 | Location: Atlanta | Registered: July 19, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Will this do what you require:

SET NODATA=NONE
TABLE FILE CAR
SUM CAR
SALES NOPRINT
BY COUNTRY
BY BODYTYPE
ROWS 'CONVERTIBLE' OVER 'HARDTOP' OVER 'SEDAN' OVER 'ROADSTER'
BY CAR NOPRINT
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Member
posted Hide Post
wow, this looks great. I'll drop it in my code and see what happens. thanks so much!!!!!
 
Posts: 15 | Location: Atlanta | Registered: July 19, 2005Reply With QuoteReport This Post
Member
posted Hide Post
That code worked great. One last question. Can anyone think of a way to make the rows dynamic? My data changes too much for me to hard the rows.

I wish I had come here two days ago.
 
Posts: 15 | Location: Atlanta | Registered: July 19, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Raini,

The following code should do it for you Smiler

SET NODATA=NONE
SET HOLDLIST = PRINTONLY
TABLE FILE CAR
BY BODYTYPE
ON TABLE SAVE AS BODYTYPES FORMAT ALPHA
END
-RUN
-SET &Rows = 'ROWS ';
-READ BODYTYPES, NOCLOSE &Bodytype
-REPEAT Read_It WHILE (&IORETURN EQ 0);
-SET &Rows = &Rows | '''&Bodytype.EVAL''';
-READ BODYTYPES, NOCLOSE &Bodytype
-SET &Rows = IF &IORETURN EQ 0 THEN &Rows | ' OVER ' ELSE &Rows;
-Read_It
-RUN
TABLE FILE CAR
SUM CAR
BY COUNTRY
BY BODYTYPE
&Rows
BY CAR NOPRINT
END
-EXIT

This message has been edited. Last edited by: Tony A,
 
Posts: 5645 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Member
posted Hide Post
'NOCLOSE' is a new one for me. I'm on 5.2.3 in a windows nt environmen. I don't think NOCLOSE works for me.

Other than that, I think the code is brilliant.
 
Posts: 15 | Location: Atlanta | Registered: July 19, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Raini,

NOCLOSE is an option on a -READ statement that keeps the file open and the row pointers intact and has been around for a few years now.

It should function with 5.2.3 OK.
 
Posts: 5645 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Member
posted Hide Post
You're right. There is something going on with my data. I have to do a match to get the list, and somethere weird is happening after that.

Thanks so much!!!
 
Posts: 15 | Location: Atlanta | Registered: July 19, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     dense data or nodata

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