Jump to content
We've recently updated our Privacy Statement, available here ×

!! Stretch with overflow donesn\'t work !!


lingkongpiaoyi

Recommended Posts

Dear all:

  I need to display a String which is combined by two Fields in a PDF file,

So I create a variable ,the Variable expression just like this:  $F{itemDesc}+" / "+$F{itemDescEng}

Considering of the result maybe too long to be displayed, I find the [Strech with overflow ] property and checked it.

 However, it doesn't work.

To make sure I'm not making mistake, I checked this property for another Filed( not a Variable )

To my suprise, It works.

Anyone can help me ?

 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for your help.

I tried a lot,including the [Relative to tallest Object],it still doesn't work.

Finally , I decieded to create a new file, and put the variable in [Detail]

1.apply [strech with overflow ]

2.choose [Relative to tallest Object]

and it works.

 

I compare the new one with the former one, and find that there is a different:

I set [Position Type] as "Float" for the former one while for the new one I choosed "Fix relative to top".

Maybe that is the reason...

 

 

Link to comment
Share on other sites

  • 5 years later...

The given 2 solutions did not work for me. But following did:

I created a subreport. In here 2 Parameters. Then I drop the parameter in the Band (my case a Header Band - but presumably any band will do).

I select the field and got to Tab "text field" then I enable -Stretch with overflow-.

In the parent report I just pass the 2 parameters. Now stretching with any nr of parameters seems to work....

 

Link to comment
Share on other sites

  • 2 years later...

We had the same problem and found the following workaround.

Here is the jrxml source for our variable field that we needed to stretch:

<textField isStretchWithOverflow="true">
     <reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="45" width="885" height="13" uuid="2ad9e02e-f4eb-497d-9141-c2a81d396f57"/>
     <box bottomPadding="0"/>
     <textFieldExpression><![CDATA[$V{formattedReportParameters}]]></textFieldExpression>
</textField>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...