I have a report ready that is quite wide.
What is the least labor intensive way to break a 30-column line in three 10-column lines?
FYI, the pass-thru SQL returns 30 columns per row.
I have heard about sub-foot, but I don't quite understand how it works. The 30 columns are currently listed under one PRINT statement. Ideally, if I could introduce (a forced) line-feed/ new-line character between the 10th and 11th columns, and another between the 20th and 21st columns would be best...
Any insights would be much appreciated.
-SimonThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8007 & 8201
Windows 10, All Outputs
Lookup OVER. It's pretty simply really.
PRINT F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 OVER F11....F20 OVER F21.....F30
Your suggestion helps. That's a really quick and useful trick by just placing the OVER command between the 10th and the 11th column, and again between the 20th and the 21st one.
Thank you very much for that!
I do now get three 10-column lines per returned data row, with the columns nicely lined up. FYI, each of the 3 stacked columns has the same datatype and length.
However, the column headers are now no longer printed one time per page, at the top of the columns, but rather to the left of each printed column data.
When I tried to remove the column headers from the 11th thru the 30th columns (by removing the "AS 'headername'" clauses), the data column names in upper case were printed, instead.
Is there another quick fix to print the header the way I want it as shown in the example below?
Emp ID Emp Name Year Quarter Q. Wage Amount
1 Dee Sho 2017 x 1,234.56 345.67
2017 y 1,256.78 350.12
2017 z 1,300.00 375.67
2 Jay Kid 2017 x 456.78 10.50
2017 y 456.78 10.50
2017 z 475.00 12.00
Any suggestions are welcome!
In stead of removing the "AS 'headername'" use "AS ''". This will remove the column headers on the left.
To get the titles above I would suggest using a header and in your stylesheet a HEADALIGN=BODY.
WebFocus 8203M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
Turn off all the column heading and put your column headings in a Page Heading.
I would also suggest that you read the manual. There are always a number of ways to achieve what you want. You might learn some other useful commands while you are at it.
This is very basic WebFOCUS coding.
If you want to suppress the column names you use AS '' otherwise leaving out the AS clause causes WebFOCUS to use the default column header which is the fieldname from the MAS file.
You really need to read the manual. As I said this is very basic WebFOCUS report writing.
Thank you for the suggestions. I am able to get the reports to work well in HTML and when exported to Excel.
However, on the PDF, the column headers got jumbled up, and the data columns are not printed free floating, not in tabular format.
You're right, I need to learn much, very much about WebFOCUS, even the basics. So, please ignore my posts until I get to your level...
This is just to report that the issues I had with the jumbled up column headers and the free-floating (non-tabular) data columns have now been resolved.
Changes that fixed the issues with the PDF output: the (1) use of option SQUEEZE=OFF, GRID=ON; (2) one of the stacked columns was a blank specified w/ A5 (while the other ones were I5) changed to a zero w/ I5S; (3) creating a separate section to format the column headers.
Thanks again to Martin & OPALTOSH for the pointers. This post can be marked as solved now.
|Powered by Social Strata|