C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Problem with printing table with rtf text and using padding around the cell

rated by 0 users
This post has 6 Replies | 1 Follower

Top 100 Contributor
Posts 51
archana101 Posted: Thu, Jun 18 2009 4:39 PM

Hi 

We have a few clients that reported that our application freezes while printing some information. I tracked down the problem. Here is a brief description. So we print a table. The table has 3 columns, First column renders plain text that will print timing and the name. Second column is rendering rich text that prints a description and third column prints a checkbox. We are adding padding around each cell of the column. So if I remove the padding around the richtext and the check box (second and third column) it doesn't freeze. I am not sure why it freezes at printDocument.RenderBlock(nurseNotesTable)  this line when I am using padding. I am setting the canSplit property of the row to true

renderTable.Rows[row].CanSplit = true So it's possible that some of the cells get split across the page and that's why it's causing the issue. The version we were using is 2.0.20082.50031

One more interesting thing is that, we upgraded our C1Preview dlls to C1Report (2.6.20091.52012) dlls to fix one more problem with printing richText that I reported earlier. With these dlls, we don't see the problem. Do you know anything specific that might have gotten fixed in the new dlls? It will be great if you could provide me with some info explaning what's going on. We are not going to remove the padding since looks like it's working with the new dlls but I wanted some explanation as to why we do not see the problem with the new dlls. The print out looks better with padding. Having your explanation will give us more confidence not to change our code to remove padding, just upgrade will take care of it.

Waiting for your reply. Thanks,

Archana

Top 10 Contributor
Posts 1,362
C1_Dima replied on Thu, Jun 18 2009 6:14 PM

Padding itself is nothing special, the only possible explanation of the problem I can think of is that this could be another case when a specific combination of objects' sizes/locations caused a usually hidden bug to appear. Because quite a few bugs were fixed between builds 50031 and 52012, I think this particular bug was also fixed. If you can post a complete sample that demonstrates the issue with build 50031 and I'm able to repro it, I may be able to definitely confirm the fix. In any case, I am pretty sure that padding itself had nothing to do with the issue - i.e. the same bug could be triggered by specifying a particular size of the object instead of padding (hope this makes sense).

Thanks.

Cheers, Dima.
Top 100 Contributor
Posts 51

Hi Dima,

I am attaching a sample code where you will see the freezing issue.

Just click on the print button and you will see that the application hangs. After that you can check the 'Display checkbox column' and click on the print button. It will print the document fine with the checkboxes in the third column. If I comment out the line

renderObject.Style.Padding.All = CellPadding; in function  SetCommonRenderObjectProperties, the document will print with the checkbox unchecked. There is something either adding padding or something else which causes it to hang. I tried using startdoc() and enddoc() as well. But it's still the same.

So we upgraded the Preview dlls to use Report dlls to fix another issue we were having and then looks like it works fine with new dlls. I am not sure what exactly was changed between these two versions. It will be great if you could have a look at the application and let me know what's going wrong there.

There is one more issue we see on one machine and our client also sees it from some machines. Whenever you open preview, and click on the scrollbar to scroll through the page, the application hangs. I couldn't repro it in the application but if you could let me know what must be going wrong it will be great.

Hope it makes sense waiting for your reply,

Thanks,

Archana

Top 100 Contributor
Posts 51
archana101 replied on Mon, Jun 29 2009 11:08 AM

Can I have an update on this please?

Thanks,
Archana

Top 10 Contributor
Posts 1,362
C1_Dima replied on Tue, Jun 30 2009 9:47 AM

I too could repro the bug using build 50031, and could not using the current build. So obviously the bug has been fixed since build 50031 was released (about a year ago now). Hope this clarifies and closes the issue.

As for the other (scrolling) issue - does it occur with the current build as well, or also only with 50031?

Cheers, Dima.
Top 100 Contributor
Posts 51
archana101 replied on Tue, Jun 30 2009 10:03 AM

The scrolling freeze still occurs with the current build. Only thing is that it's not consistent. I couldn't still repro it on my machine. But I have seen it on one of our client's machine pretty consistently and also on one of the machines in house. Please let me know if you find something that might be causing the scroll freezing.

Thanks for looking into the sample app. Could you please let me know what was causing the problem? I know it doesn't occur with the 52012 build. But I wanted to make sure that it won't happen at all with the current build. So if you could let me know what was causing the problem and if it's fixed in 52012, it will be great!

Thanks,

Archana

Top 10 Contributor
Posts 1,362
C1_Dima replied on Fri, Jul 17 2009 8:58 AM
Hi again, sorry for the delay with replying. We have positively confirmed that the freezing issue you observed with build 50031 has indeed been fixed starting with build 51001. Thanks.
Cheers, Dima.
Page 1 of 1 (7 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2009 ComponentOne LLC All Rights Reserved.