This is a migrated thread and some comments may be shown as answers.

Table row height issue during export to PDF.

5 Answers 489 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 2
Andrey asked on 14 Nov 2011, 09:54 AM
Hello,

  I have a table with several rows.  Some of them are spanned.

  Each of row has constant height in 8 points:
  var tableRow = new TableBodyRow(Unit.Point(8));

  Each of cell contains a TextBox with following style:
  var textBox = new TextBox
   {
           Docking = DockingStyle.Fill,
           CanGrow = false,
           CanShrink = true,
           TextWrap = false,
 };

But after exporting to Pdf some of columns are higher that 8 points (see picture).

How to fix the row height for a table?

P.S. The similar problem is described here: "http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-equal-cell-s-height.aspx"

Thanks,
-Andrey Popov

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 17 Nov 2011, 08:34 AM
Hi Andrey,

The scenario in the other forum thread you have referenced is completely different and in fact is not a problem but expected behavior when you are using Automatic Layout (Dock and Anchor) to mimic tabular layout.

We cannot advise only by the screenshot you have provided, but it looks like the "correctly sized" row groups are static headers, while the one you claim have grown are the rows from the detail group. We would be able to provide more info if that is the case, when we review your report. Generally, you do not need to apply Docking or Anchoring to report items added in Table/CrossTab cells, so you can remove this from your code.

Best wishes,
Steve
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

0
Andrey
Top achievements
Rank 2
answered on 17 Nov 2011, 10:16 AM
Hello Steve,

  Thank you for reply. I hope you will help me to find and fix the issue.
   It is very critical problem because the count of the rows on one page should be controlled and constant. For that the rows height should be equal.

  The "correctly sized" row groups are not static headers, they are rows. See the picture "telerik-reporting-table-row-growing-2.png".

  I found one more strange behavior: if I try to span two latest columns in the same report then the rows height are equal (see picture "telerik-reporting-table-row-growing-3.png").
  Maybe it will help.

  Unfortunately, I can not send the application code because the report is part of very big application.
  But I will try to create small sample and send you (it will take some time).

P.S. I deleted the docking but it did not help ))

Thanks,
-Andrey Popov
0
Steve
Telerik team
answered on 22 Nov 2011, 09:41 AM
Hello Andrey,

We would wait on your sample application. Note that we do not need your actual project and if you can easily reproduce this in a very simple report, this would greatly help us in identifying the issue.

All the best,
Steve
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

0
Andrey
Top achievements
Rank 2
answered on 23 Nov 2011, 09:31 AM
Hello Steve,

  I have prepared the sample.
  It is console application which generates the "ForecastExportTelerikSample.pdf" file (simple report in 1 page, see picture "ForecastExportTelerikSample.png").

  Unfortunately the forum does not allow to publish archives.
  I have create the support ticket: 485978
  Also I can send the solution by email.

  P.S. Please do not hesitate to ask questions.
  P.P.S. Solution needs VS 2010 + .net 2.0 + Telerik Reporting 5.1.11.928
  P.P.P.S. Now I am going to try new Telerik version (5.3.11.1116), maybe it will help...
 
Thanks,
-Andrey Popov
0
Andrey
Top achievements
Rank 2
answered on 23 Nov 2011, 11:34 AM
Hello Steve,

  I found the issue :)

  Some empty cells in the report contains the space symbol (" ") instead of empty string "".
  And also these cells use the default "TextBox" font.
  As result component grows the rows which contains these cells.

  After replacing the space symbol to empty string the table have equal rows.

  I am closing the ticket.
  Thank you for help!

Thanks,
-Andrey Popov
Tags
General Discussions
Asked by
Andrey
Top achievements
Rank 2
Answers by
Steve
Telerik team
Andrey
Top achievements
Rank 2
Share this question
or