Focal Point
[SOLVED] append blank rows in report

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

December 23, 2018, 11:29 PM
AR
[SOLVED] append blank rows in report
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
December 24, 2018, 02:07 AM
Danny-SRL
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

December 24, 2018, 07:50 AM
MartinY
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.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
December 24, 2018, 03:01 PM
Doug
How about SKIP-LINE? Or, DEFINE a BLANK_ROW field and use that?

This message has been edited. Last edited by: Doug,
December 25, 2018, 01:14 AM
Danny-SRL
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

December 26, 2018, 11:34 PM
AR
 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
December 27, 2018, 01:14 AM
Danny-SRL
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