Showing posts with label spaces. Show all posts
Showing posts with label spaces. Show all posts

Wednesday, March 28, 2012

Padding blank spaces when exporting to PDF?

I know that some people have already asked this question, but answers were not usefull to me.

I want to export the content of my textbox to PDF and can't find the way to save it's formating on pdf.

I'm creating a report for invoice. I have one TextBox at the end of report for displaying terms of payment.
There can be several paragraphs in this text. This text is stored in one column, which is nvarchar, in database.

Is there any way to keep the blank spaces that I use at the beginning of paragraph? Is there any non-printable character that
won't be ignored when trying to insert a new paragrapf in PDF? I can't use tab and blank spaces-these are ignored. And I don't
know how many paragraphs there will be-this changes.Pozdrav!|||

I'm not sure but can't you do something like this:

Write custom code that evaluates the string. The custom code will iterate through the string and will evaluate each character. If it is a " " (space), then add another value to a counter. Then you know how many spaces there are in a string.

|||

Yes, but I can't find the way to put those blank spaces at the beginning of each paragraph.
They are ignored. It is not that I don't know how many blank spaces there will be, I simply
don't know how to make them appear on my PDF.

Pad Trailing Spaces in a Report Expression

I am trying to pad a fixed number of trailing spaces into a report expression, as follows:

Data:

CUSTOMER_NAME
-
Michael
Peter
John

Result (e.g. with 10 spaces padded, assuming all names are below 10 characters long):

"Michael "
"Peter "
"John "

Is there an easy way to achieve this ?

Thanks.

Kenny

If you want a 10 character string, right padded with spaces, you could do this:

=Fields!datafield.Value & right(" ", 10 - len(Fields!datafield.Value))

(10 spaces in quotes)

HTH

BobP

Pad Spaces in FFConnection properties?

This is a considerably LOW priority, but is there a way to padd spaces in ssis flat file connection properties? We have cases where a CSV file will read in and throw a truncation error because the field length is greater then defined. However, the CSV file might look like ,"ABC ", where a number of trailing spaces are found. Is there some way to handle this without having to adjust teh field length, maybe ignore whitespace at the source?There is no way at the Flat File Source to ignore trailing whitespace, however there is a work around. Say in this case your field length is 3, and if there are trailing spaces after that, you want to ignore them. You can then use "Ignore Failure" for Truncation Error Disposition. That is, in the Error Output tab for the Flat File Source, for Truncation of this column, choose "Ignore Failure", instead of "Fail Component". By doing this, it will only get the specified characters, and ignore the rest, whether they are trailing white spaces, or some other data there. You have to make sure that this is not causing you to accept some data which you otherwise wanted to fail on really.|||

That is partially the problem, we only want to ignore whitespaces, but if there is actual chars then we would want to throw truncation error.

Thanks for your thoughts...