Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix of two vertical bands overlaying #18

Closed
wants to merge 1 commit into from
Closed

fix of two vertical bands overlaying #18

wants to merge 1 commit into from

Conversation

rushan-zagidullin
Copy link

@rushan-zagidullin rushan-zagidullin commented Apr 28, 2017

Sample. This solution works for my situation discribed in CUBA forum This solution is not fully tested

@ODE-SA
Copy link

ODE-SA commented Oct 3, 2017

tried this fix and it does not fix our issue (1 vertical band that extends to overlap a previous horizontal band). LibreOffice opens the file correctly, M$Excel gives warning about errors, then when asked to fix them the whole place that was supposed to be populated by the vertical band is empty.

If the horizontal band is defined (and populated) after the vertical band expansion, then M$Excel works correctly.

Copy link

@belyaev-andrey belyaev-andrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can improve the code.

@@ -591,6 +602,17 @@ protected Row findNextRowForVBand(BandData band, Range templateRange, List<Row>
return firstRow;
}

protected boolean isNotRenderedYet(List<BandData> bandDataList) {
if(CollectionUtils.isNotEmpty(bandDataList)) {
for (BandData bandData : bandDataList) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use stream.containsAny here?

@@ -573,7 +573,18 @@ protected Row findNextRowForHBand(BandData band, Range templateRange, List<Row>
protected Row findNextRowForVBand(BandData band, Range templateRange, List<Row> resultSheetRows) {
Row firstRow = null;
boolean isFirstLevelBand = BandData.ROOT_BAND_NAME.equals(band.getParentBand().getName());
previousRangesRightOffset = 0;
//if this band is first rendered band of all its siblings
if (isNotRenderedYet(band.getParentBand().getChildrenList())) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get NPE here because you check it later.

@kkorada
Copy link

kkorada commented Aug 14, 2018

is this issue fixed ?

NikitaShchienko added a commit that referenced this pull request Aug 7, 2019
@haulmont-git haulmont-git added the ver: 2.1.6 ver: 2.1.6 label Aug 7, 2019
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Rushan Zagidullin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rushan-zagidullin rushan-zagidullin closed this by deleting the head repository May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ver: 2.1.6 ver: 2.1.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants