Focal Point
[SOLVED]1 field 3 columns per page

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

April 05, 2016, 01:34 PM
Jay Potter
[SOLVED]1 field 3 columns per page
I have a request to show a single column report that has a lot of records. The user would like to reduce the amount of pages by displaying 3 columns per page. Is there a easy way to do this?

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
April 05, 2016, 02:10 PM
Francis Mariani
Jay, take a look at Creating Reports With WebFOCUS Language > Laying Out the Report Page > Working With Mailing Labels and Multi-Pane Pages, though this is for PDF only.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 05, 2016, 02:13 PM
Francis Mariani
Here's another way to do this:
SET HOLDLIST=PRINTONLY
SET PAGE=NOLEAD
SET HTMLCSS=ON

TABLE FILE EMPDATA
PRINT
COMPUTE FULL_NAME/A30 = FIRSTNAME || (' ' | LASTNAME);
BY FIRSTNAME NOPRINT
BY LASTNAME NOPRINT
ON TABLE HOLD AS EMPDATAHOLD
END

DEFINE FILE EMPDATAHOLD
COL/P6 = IF COL LT 3 THEN (COL + 1) ELSE 1;
ROW/P6 = IF COL EQ 1  THEN (ROW + 1) ELSE ROW;
END
TABLE FILE EMPDATAHOLD
SUM FULL_NAME
BY  ROW  NOPRINT
ACROSS COL NOPRINT
ON TABLE SET STYLE *
TYPE=REPORT, BORDER=1, SQUEEZE=ON, FONT=ARIAL, SIZE=10, $
ENDSTYLE
END

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 05, 2016, 02:16 PM
BabakNYC

TABLE FILE WF_RETAIL
PRINT FULLNAME AS ''
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE=LETTER, PAGEMATRIX=(3 1), ELEMENT=(3.5 8.0),
MATRIXORDER=VERTICAL, $
TYPE=REPORT, SIZE=8, $
END




WebFOCUS 8206, Unix, Windows
April 05, 2016, 02:30 PM
BabakNYC
What's nice about Francis' technique is that you're not limited to PDF output. Very elegant.


WebFOCUS 8206, Unix, Windows
April 05, 2016, 02:40 PM
Jay Potter
I got this to work by creating a hold file in front and sorting it the way I need it. But the user wanted the values going down not across. But I may talk him into it because it is versatile for the format. The other version did go down but it is only for pdf as indicated, plus there aren't any headers.

Thank you for the help! I am sure i can use one of these and I will try to do some additional tweaking.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
April 05, 2016, 05:17 PM
Francis Mariani
Jay, I thought you might like the values going down! I think it might be possible in two passes (like we're doing now) We know how many columns. We would need to know how many rows, then somehow calculate a sort number. This would be an interesting task to work out...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 06, 2016, 05:34 AM
Jay Potter
They do want it to go down, but the problem is that some values will wrap. So it is hard to know how many rows per page. If I can get them to do only 2 columns, then it shouldn't wrap.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster