× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



So what you are doing is setting columns A-E to repeat when the spreadsheet
is more than one page wide. It is probably expecting you to have
non-repeating columns as well. If you just want the rows to repeat, use
ssSheet_setRepeatingRows by itself.

On Wed, Nov 29, 2017 at 10:45 AM, Pieter Henrico <phenrico@xxxxxxxxxxx>
wrote:

Hi everyone

We have a V7R2 server running POI 3.15.

I have a problem with the POI 3.15 functions of SetRepeatingRows and
SetRepeatingColumns. When I set in in my RPG program, it messes up the
printing part, by causing the columns to be squashed. In the program I am
forcing the document to "fit everything on one page wide", but instead of
the 6 columns to be printed, it now has around 7 or 8 empty additional
columns more to print, causing the squashing of the printout.

The ironic part is that the repeating headers rows and columns are
actually
working correctly and showing correctly inside Excel, but somehow the
columns now become squashed on printing. I suspect the problem is caused
when I use a cellrangeaddress with the functions, as the document now
seems
to think it has to include more columns as part of print region, but that
is
just a guess.

Here is the prototypes for both Java items:

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* SSSheet_SetRepeatingRows;
* Set Repeating rows
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D SSSheet_setRepeatingRows...
D PR EXTPROC(*JAVA
D : SHEET_CLASS
D : 'setRepeatingRows')
DRowRange like(CellRangeAddress) const

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* SSSheet_SetRepeatingColumns
* Set Repeating Columns
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D SSSheet_setRepeatingColumns...
D PR EXTPROC(*JAVA
D : SHEET_CLASS
D : 'setRepeatingColumns')
DColumnRange like(CellRangeAddress) const

Here is my prototype where I call the two Java POI prototypes in the
program:

dcl-proc ss_SetRepeatingHeaders;
dcl-pi ss_SetRepeatingHeaders;
peSheet like(HSSFSheet);
peRowFrom like(jint) value;
peRowTo like(jint) value;
peColFrom like(jshort) value;
peColTo like(jshort) value ;
End-Pi;
dcl-s myRegion like(CellRangeAddress);
//
myRegion = new_CellRangeAddress( peRowFrom
: peRowTo
: peColFrom
: peColTo);
ssSheet_setRepeatingRows(sheet:myRegion);
ssSheet_setRepeatingColumns(sheet:MyRegion);
hssf_freeLocalRef(myRegion);
end-proc;

And here is the actual program call, where the Excel file is generated:

// Force the page to print one page wide.
SSSheet_SetFitToPage(sheet:*On);
ps = SSSheet_getPrintSetup(sheet);
HssfPrintSetup_setLandscape(ps:*off);
SSPrintSetup_setFitHeight(ps:0);
SSPrintSetup_setFitWidth(ps:1);
SSSheet_Setmargin(Sheet:MARGIN_LEFT:0.5);
SSSheet_Setmargin(Sheet:MARGIN_RIGHT:0.5);
ss_SetRepeatingHeaders(Sheet:RowCount:RowCount:0:5);

Any help would be greatly appreciated.

Thanks

Pieter


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.