Page 1 of 1

Space between data rows not honoured if rows have "newline"

Posted: Thu Jun 05, 2008 3:28 am
by Fabio Pagano
Using 3 June 2008 build.

I have 3 rows, in the second one i have some "System.Environment.Newline" in it.

I want that between the rows must be a defined space, so i have drawed the data band higher than the text field.

In preview, note that the space between the second row and the third row is little, while the space between the first and the second row is correct.

The problem is caused by some "System.Environment.Newline" that i have in the second row.

Here is the sample:

SpaceBetweenRows.zip

Thanks.

Space between data rows not honoured if rows have "newline"

Posted: Mon Jun 09, 2008 4:37 pm
by Edward
There are two ways possible.

1) you can insert "System.Environment.Newline" symbols after {Table.Value} expression in the text property of the Testo1 component. Just press enter two-free times to insert these symbols after the expression.

or

2) Just place after Testo1 any text component with desired height = necessary space between lines. CanGrow and CanShrink must be set in false for this StiText. ShiftMode= IncreasingSize, DecreasingSize.

Now all lines have the same gap between them.

Thank you.

Space between data rows not honoured if rows have "newline"

Posted: Tue Jun 10, 2008 6:07 am
by Fabio Pagano
The problem is a little more complex.

On the data band i have two fields, "Description" and "Price".

The description can occupy more lines, with newline in the text.

I need that the Price is printed aligned at the last line of the description.

Eg.

"This is the description
of the work to do" "Euro 100"

Using your solution to add an empty field below (honestly i don't like such workarounds, i'd prefer that the problem should be natively solved), i have obtained this result (i have put the lines around the fields to be more clear):

Image

The space between lines is correct, but the price is not printed on the last description line, but on the line after.

Instead, what i wanted was:

Image

This is the design screenshot:

Image

In attachment i have put the sample project and the report designed, there you can see the problem.

SpaceBetweenRows_New.zip

---edit

I would add that i think that the problem is caused by the "Horizontal alignment" set at "Bottom" in the Price field. With this setting, the price text is "pushed off the field" and goes in the field under it (the empty one added for space between rows).

Thank you.

Space between data rows not honoured if rows have "newline"

Posted: Tue Jun 10, 2008 7:49 am
by Brendan
Hi Fabio,

I think there's two ways I know of that you can do this.

The first is to use the Dock property for the 3 text components on your band. You could dock the empty line at the bottom, the description to the left and the price to the right.

Image

The second method is to take the Empty line out of the Databand (which is the reason why the Price is growing down on top of it) and put it in a Child Band. This way it will keep the empty line from interfering with data in the DataBand.

Image

Space between data rows not honoured if rows have "newline"

Posted: Tue Jun 10, 2008 8:03 am
by Fabio Pagano
Thank for the answers. Both solutions worked. I'll go for the one with the child band.

Thank you.