Servlet build error using Aspose.Words for JasperReports

It turned out you were correct and there was one extra paragraph break on all the pages except the first one! Still the distance between the header and the first element in the body is different on the first page and on the subsequent pages (this is by design), but not so big as before. Please approve the result :)

By the way, it seems like 0_1 contains overlapping items. When debugging, I sometimes encountered empty text elements whose coordinates and size exactly matched some others. That led to the small (1.0 pt) paragraph breaks that follow some of the text in table cells, see them? I'm wondering if I'm correct. Could you please double check it in your design? If I am wrong, then this is an issue on my end, but that only happens for 0_1, that's what is odd.

And finally, please try out an interim build I'm attaching. I'm looking forward to your response :)

DmitryV:
Due to our customer's suggestion, I have implemented another approach on how the tables are build. Namely, they suggested using cell paddings instead of paragraph indents and spacing (earlier I rejected that idea because I couldn't achieve correct table layout when paddings differed from cell to cell, but that is the past) and setting line spacing to single. Sorry for a bunch of technical details; please find attached. You're going to see page contents have become shorter, thus minimizing the chance of expanding off the page somewhere in the document. Now I'm worrying about whether the contents look shorter than needed... please give your estimation :)


I checked your attached document, and I think that while now it has no black pages as it used before, well, it IS actually too short. There is a lot of wasted space at the end of each page, so much that actually that specific document could be 2 pages long instead of 3. I'll need to try this new feature with other reports to have a correct idea of the results we can obtain. But, could it be possible to specify an option of what rendering method (old one VS this new one) to use?

I started sorting out the margins issue. I have implemented the following algorithm. Page margins are considered to be Word's default (1 inch) unless report elements are located closer to page edge; in this case the corresponding margins are reduced appropriately. I think it's okay for the time being. Introducing a special parameter to set the margins explicitly is still to come.


I'd say this is a good starting point, waiting for the final implementation of the parametric margins :)

So please find attached. This week is going to be hard :) Apart of keeping on working with you on the persisting issues, I want to finish working on the margins, implement the PAGE field support, (maybe) introduce the 3-state option for page breaks and (maybe) get rid of EXPORT_LINES and EXPORT_RECTANGLES parameters.

why would you want to remove the EXPORT_LINES and EXPORT_RECTANGLES parameters? I think they're quite useful, and as a matter of fact we are using them in our print servlets :)

By what you say it'll really be a tough week. I'm at your disposal for every test you may be wanting me to do for you. Since you haven't started implementing the page numbering yet, may I ask you if can you implement it so to recognize strings in different languages? For example, "page X of Y" for English, "pagina X di Y" for Italian, and so on for other languages. I think it'd be useful for your international customers!

By the way, it seems like 0_1 contains overlapping items. When debugging, I sometimes encountered empty text elements whose coordinates and size exactly matched some others. That led to the small (1.0 pt) paragraph breaks that follow some of the text in table cells, see them? I'm wondering if I'm correct. Could you please double check it in your design? If I am wrong, then this is an issue on my end, but that only happens for 0_1, that's what is odd.

that is correct, that document has perfectly overlapping elements, with a "print when" statement so that only one of them is printed at each time. Such constructs are present in other reports we created, and has presented no issue to us up to now. I mean, all other document with that kind of overlapping elements, but making so that only one element is actually printed, has given us no problem with your library.

And finally, please try out an interim build I'm attaching. I'm looking forward to your response :)

do you want me to generate again our big document?

BTW, this week our company is going to close for vacations, from August the 7th to August the 17th, just to let you know ;)

Could you please explain me in some more detail how does this new method for drawing tables works? I can see they’re quite smaller than before, but that’s actually a problem for us, because we have table with large cells (sometimes not completely filled up) which are MEANT to be large to make the document easier to read for our customers. Now all tables look compressed.

That’s a drawback of posting interim builds :slight_smile: I’ve just fixed that. I’m going to provide you another hotfix that always preserves cell height very soon.

No need to be hasty =) I’d better receive later something that works well, instead of receive it earlier but with bugs =D

Sure. And, answering your question about what is happening with tables: you can take a look at this discussion

https://forum.aspose.com/t/88024

and join it if you wish. As you can see, the main problem is that Word makes tables longer than needed in flow mode, and that's why they often expand off the page, causing blank pages to appear. I disabled setting row height first (or, rather, set it to Auto), but you just saw it didn't work :) so it seems like I still need to set row height to a reduced value by subtracting the total of top and bottom cell paddings.

I know it sounds boring, but I've been struggling against this since I developed Aspose.Words for Reporting Servives :) Flow layout is a kind of a "not precise" thing, say like text recognition, because we can't instruct Word how to position items exactly, we can only calculate the output so that it will hopefully render it as we expect :)

Well, it is not boring for me, but perhaps this happens 'cause I’m a programmer too =) I’ll give a look to that thread as soon as possible. In the meantime, you didn’t answered to my question whether you wanted me to recreate the big document now or not.

I also wanted to ask you when will you be leaving for your vacation. Sorry if I ask it here, but I can’t find how to access to private messages =S still, we need to know it so that we can be prepared to not receive further assistance while you’re away =)

Sorry for not replying to the question earlier. Perhaps you wait for the next hotfix I will attach here very soon (it sets row height correctly so you won't encounter collapsed tables anymore) and then try to generate your huge document to take a look if we still have more issues to fix.

As to my vacation, I still need to discuss exact dates with my team leader, but I think it's going to be at the end of August, so I believe we will surely solve all the current issues until that moment :) and even while I'm away, my colleagues will register each of your requests so the process of improving the product will never stop :)

Ok, thanks for the additional information =)

By the way, I wanted to report that the build you sent me today makes quite a mess with table-heavy reports like report 2_2 I’m attaching. Perhaps it might help giving it a look, unless I’m late and you already resolved this issue (or a similar one).

Yep, that was predictable, setting row height to Auto everywhere was obviously a bad idea :) So - please find attached the Nth build... the only difference from the previous one is the correct handling of row height.

Now you can test it against your large report and tell me what issues are still there.

Tomorrow I’ll try it right away, and then I’ll send you all the data available, as I did the last time. I’ll also give you a print of another big document our application can generate, which I didn’t show you last time.

I just tried generating both of our “final” documents. I’m AMAZED of how much the quality of the final document has improved!!!

There are still some flaws, though, primarily about table losing their correct alignment (while it was correct before, the best example of this is “Sez: 2 Doc: 2” in DVR_3_3.doc), and you’ll find them commented in the documents inside the archives. This time it’ll be much easier for you to find which .jrprint corresponds to the section you’re looking at, 'cause this time I’ve been able to make them match =)

Anyway, I am really without words. So many improvements in so little time is just… just… amazing! Well done, really!

Sounds quite encouraging… :slight_smile: Please expect getting rid of the rest of issues shortly!

Well, the result il really awesome =) I mean, not a single blank page (except for the section I told you)!

When we’ll have the new page numbering method, the margin parameters and the page/section break management, it’ll be almost perfect =D

Hope to have it completed till Monday :)

Well, as I said, our company will be closed from August the 7th to August the 17th (included), so if it takes more time, is really not a problem =)

I wanted to inform you that, aside from this new table alignment problem, there is still the left-right cell-padding problem in tables, when you export in .docx format (the one that was reported earlier from another user) it won’t respect cell padding properly.

Okay Matteo, I’m working on your issues right away, so please expect a hotfix today (I believe).

Ok, thank you. No need to hurry anyway =)

Matteo,

By the moment things are as follows:

DVR_3_3:

Page 19: The text is outside of the table because there is no reason of enclosing it inro a table. I understand it would be more consistent if the table with an image on the right would continue; maybe this will happen once I implement the "no page breaks mode", but I can't promise.

Table alignment here and onwards was fixed.

Page 28: The too big cell was fixed. The grey separators were fixed too.

Page 42: Not sure what waste space you mean.

Now that there is no need to rush, I'm going to continue tomorow :) Have a good vacation and I'm looking forward to see you after the 17th :)