Text getting cut off when exporting to PDF

Stimulsoft Reports.WEB discussion
Post Reply
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Text getting cut off when exporting to PDF

Post by Scottioioio »

I am using Stimulsoft.Reports.Web.2013.1 and need to create a report that has a page for each record returned from a database query. On each page I want to show a table that has a row for each field and two columns: the left column showing the field name (e.g., "Name") and the right column showing the field value (e.g., Michael Jackson). Some of the values can be several sentences long and can wrap.

I have created such a report by using a DataBand and then in the DataBand adding appropriately sized TextBoxes for the labels in the left and values in the right. This works swimmingly when viewing the report from a web page. I've attached an image showing how this works as expected. Note that I've blurred out the field values, but you can see the field value for the Comment / Issue is several sentences long and the text wraps as desired.
Text is wrapping when viewed through report viewer in a web page
Text is wrapping when viewed through report viewer in a web page
ReportViewWorking.png (16.26 KiB) Viewed 3768 times
The problem is that when I export this to PDF using the Save --> PDF feature from the report viewer, the PDF text does not wrap. I've also included a screenshot of the same row when exported to PDF. Note how the Comment / Issue row does not grow - the text gets cut off.
Text gets cut off in PDF export
Text gets cut off in PDF export
ExportPDFNotWorking.png (18.14 KiB) Viewed 3768 times
I've tried setting the Can Grow and Word Wrap properties of the TextBox that holds the value of the Comment / Issue (and of the TextBox that holds the text "Comment / Issue") but it only increases the height of the field value and not of the label, which results in a "broken border" (see screenshot). The upside of this is that the exported PDF doesn't cut off the text, but it too suffers from the "broken border."

I surmise the problem is because I'm using TextBoxes rather than a table, so the label "cell" doesn't necessarily align with the value 'cell," but I was unable to determine how to create a table for a single database record with rows for each field and with two columns for the name/value of each field.
Setting Can Grow and Word Wrap properties leads to a broken border.
Setting Can Grow and Word Wrap properties leads to a broken border.
BrokenBorder.png (17.14 KiB) Viewed 3768 times
Any help is much appreciated.

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Text getting cut off when exporting to PDF

Post by HighAley »

Hello.

Please, try to set the Grow to Height property of the Text component on the left to True.
You could get more information on the Binding the Bottom Border of a Component section on our User Manual.

Thank you.
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Re: Text getting cut off when exporting to PDF

Post by Scottioioio »

Since I have a series of TextBoxes (two for each "row") setting the Grow to Height property pushed the border all the way to the bottom of the DataBand.

After some tinkering I was able to get it to work, though. I had to add a Panel for each row and set the Panel's Can Grow property to True. Then I added the left and right TextBox for each "row" into the respective Panel and set the left TextBox's Grow to Height to True and the right TextBox's Can Grow and Word Wrap properties to True.

Now the data and formatting looks great both on the web and in the PDF export.

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Text getting cut off when exporting to PDF

Post by HighAley »

Hello.

we are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply