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] append blank rows in report
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] append blank rows in report
 Login/Join
 
Member
posted
Hi

I want to add blank rows in a report. it should be in tabular format and not a blank row in footer.
also, the blank rows should always be at the end of the table.

Thanks in advance
Ashwini Rane

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 19 | Registered: December 15, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
How many blank rows? More or less than the number of rows in the report? Than the number of records in the file?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1936 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
The questions to Danny are legitimate and can change the way of doing things.

Here is an option
DEFINE FILE CAR
NB_SEATS /I3 MISSING ON = SEATS;
END
TABLE FILE CAR
PRINT NB_SEATS
BY TOTAL COMPUTE DUMMY /I2 = 1;
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS EXTDATA
END
-RUN

TABLE FILE CAR
PRINT COMPUTE NB_SEATS /I3 MISSING ON = MISSING;
BY TOTAL COMPUTE DUMMY   /I2  = 99;
BY TOTAL COMPUTE COUNTRY /A10 = '';
BY TOTAL COMPUTE CAR     /A16 = '';
BY TOTAL COMPUTE MODEL   /A24 = '';
BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 4;
ON TABLE HOLD AS DUMMYDATA
END
-RUN

TABLE FILE EXTDATA
PRINT NB_SEATS
BY DUMMY
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS RPTDATA
MORE
FILE DUMMYDATA
END
-RUN

SET NODATA = ''
TABLE FILE RPTDATA
PRINT NB_SEATS AS 'SEATS'
BY DUMMY   NOPRINT
BY COUNTRY
BY CAR
BY MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET BYDISPLAY ON
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END
-RUN


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2234 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
How about SKIP-LINE? Or, DEFINE a BLANK_ROW field and use that?

This message has been edited. Last edited by: Doug,
 
Posts: 3045 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I would use MacGuyver:
 
-SET &ECHO=ALL;
-* File AR_McGuyver.fex
-DEFAULT &BLANKLINES=5
-SET &BLANKLINES=&BLANKLINES + 1;
SET NODATA = ' '
-*
JOIN BLANK WITH SALES IN CAR TO BLANK IN FSEQ AS B_
-*
DEFINE FILE CAR
BLANK/A1 WITH SALES=' ';
SRT/I3=IF COUNTER EQ 1 THEN 1 ELSE 2;
XSALES/I5S=IF COUNTER GT 1 THEN 0 ELSE SALES;
XCOUNTRY/A10=IF COUNTER GT 1 THEN ' ' ELSE COUNTRY;
XCAR/A16=IF COUNTER GT 1 THEN ' ' ELSE CAR;
XSEATS/I3S=IF COUNTER GT 1 THEN 0 ELSE SEATS;
END
-*
TABLE FILE CAR
BY SRT NOPRINT
BY COUNTER NOPRINT
SUM XSALES AS SALES
BY XCOUNTRY AS COUNTRY
BY XCAR AS CAR
BY XSEATS AS SEATS
ACROSS MPG IN-GROUPS-OF 10
WHERE COUNTER LE &BLANKLINES
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
 INCLUDE=ENDEFLT.STY, $
GRID=OFF, $
ENDSTYLE
END 


MacGuyver FSEQ master (change the directory from FOCALPOINT to the name of the directory where fseq.txt is placed:
  
 FILE=FSEQ, SUFFIX=FIX, DATASET=FOCALPOINT/FSEQ.TXT, $
  SEGNAME=SEG1
   FIELD=CONTROL, BLANK , A1, A1, $
  SEGNAME=SEG2, PARENT=SEG1, OCCURS=VARIABLE
   FIELD=CHAR, , A1, A1, $
   FIELD=COUNTER, ORDER, I4,  I4,$

MacGuyver data file, fseq.txt. IMPORTANT: the first character is a space!!!
  
 FSEQFILEFORMCGUYVERFSEQFILEFORMCGUYVERFSEQFILEFORMCGUYVERFSEQFILEFORMCGUYVER

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1936 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Member
posted Hide Post
 TABLE FILE CAR
SUM SALES BY COUNTRY BY CAR
ON TABLE HOLD
WHERE COUNTRY NE 'ENGLAND';
END

-* find out the number of records.
DEFINE FILE HOLD
COUNTER/I3 = COUNTER + 1;
SALES/I6S  = SALES;
END
TABLE FILE HOLD
PRINT SALES COUNTRY CAR
BY COUNTER
ON TABLE HOLD FORMAT ALPHA
END
?FF HOLD

-* find the hightest counter.
TABLE FILE HOLD
SUM MAX.COUNTER
ON TABLE SAVE
END
-RUN
-READ SAVE &COUNTER.I3.

-* append 4 blank records.
FILEDEF SAVE DISK hold.ftm (APPEND
DEFINE FILE HOLD
COUNTER/I3  = IF LAST COUNTER EQ 0 THEN &COUNTER +1  ELSE LAST COUNTER + 1;
-* make some blank values.  use the formats from ?FF HOLD
COUNTRY/A10 = ' ';
CAR/A16     = ' ';
SALES/I6S   = ;
END
TABLE FILE HOLD
PRINT SALES COUNTRY CAR
BY COUNTER
WHERE RECORDLIMIT EQ 4
ON TABLE SAVE
END

-* produce the final report.
FILEDEF HOLD DISK hold.ftm
TABLE FILE HOLD
PRINT *
END 


I have used above code.
Thanks for the help


WebFOCUS 8
Windows, All Outputs
 
Posts: 19 | Registered: December 15, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Ashwini,
As you can see there is always more than one way to solve a problem with WebFOCUS.
The basic difference between your solution and mine is the number of times the data is read and this can be of the essence with large data sets.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1936 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] append blank rows in report

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