Jump to content
JasperReports Library 7.0 is now available ×

JExcelApiExporterParameter.IS_COLLAPSE_ROW_SPAN


bbharat

Recommended Posts

I am using this property in my view to merge/collapse cells when data in adjacent cell grows.

 exporter.setParameter(JExcelApiExporterParameter.IS_COLLAPSE_ROW_SPAN, Boolean.TRUE);

See the FIRST screenshot attached. If I set this property TRUE in my view, all these cells align perfectly. but if you notice the EXCEL TOOLBAR "Merge and Center" button is highlighted indicating there are some hidden merge cells. You cant see these merged cells becasuse of this property but its there since it doesnt let you sort.

When you mark this property false, it then shows you all those hidden cells, see 2nd screenshot attached.

 

Looks like a bug in jasper where when you set this property TRUE, it collapses the cells but fails to indicate excel tht there are really no merge cells.

Any clues or suggestions?

 

Thanks very much

Link to comment
Share on other sites

  • Replies 16
  • Created
  • Last Reply

Top Posters In This Topic

So heres the snipper of my xls view class which is setting following property:

------------------------------------

exporter.setParameter(JExcelApiExporterParameter.IS_COLLAPSE_ROW_SPAN,Boolean.TRUE);

------------------------------------

when I do this, report comes up fine with no "visible" merged cells. (IN EXCEL)

but at the same time, excel highlights the button under MS EXCEL toolbar ie, "MERGE AND CENTER" suggesting that there are HIDDEN MERGED CELLS and untill you sort that out or CLICK THIS BUTTON, you will not be able to sort the report.

screenshot name: good

---------------------

Now, when you change the property to false:

exporter.setParameter(JExcelApiExporterParameter.IS_COLLAPSE_ROW_SPAN,Boolean.FALSE);

you can see that there are still cell merging going on. Not sure why. Screenshot name "bad"

 

Thanks!

 

Link to comment
Share on other sites

Perfect, works like a charm. This took care of that merge and center highlight issue.

Do you have a date of release of the new API? Also, will that include how crosstab handles null, empty string or empty space string? currently it brings the entire crosstab length cell in the report.

Thanks very much Lucian.

Link to comment
Share on other sites

Thanks so much Lucian. I see that 3.5.0 was released yesterday but I am assuming its not in this release.

Sorry to bug on this but do you think you can provide even a tentative release date? like 1 mont or 2 months?

That will be very helpful.

Thanks again.

Link to comment
Share on other sites

So the list of issues which will be awesome to have in the next release:

- XLS hidden merging of cells which you just fixed for us. :)

-  Crosstab fills empty cell(when no data ie, null) with a cell of width of the entire crosstab. I tried suppressing that null with a empty string ie, "" but still crosstab will insert a empty cell of width =crosstab width thereby screwing the entire xls report. I also tried adding "<empty spaces>" as a teranary operator in properties but it still didnt work.

XLS copy attached. You will see that I have a simple crosstab with 2 questions on column and "yes" and "No" as answers from different ppl. When the report shows up, you will that ROW 4, 5, 6 dont have any answers so instead of printing blank with same cell size, it spits the entire crosstab width cell and thereby pushing other data.

---------------------------------------------

Please let me know if you want more info or its not clear. I ll try to get you a better example.

Thanks very much

Bharat

Link to comment
Share on other sites

No, the fix did not make it in JR 3.5.  I still can't give you an estimate for the date of the next release, it will probably happen within 2 months as that's the average JR release cycle.

Please do log bugs for all these issues, including the one for which I sent you the hotfix.

Regards,

Lucian

Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...