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

Alignment problem in crosstab html output


Recommended Posts

By: Manuel Lamotte - gaco_warlock

Alignment problem in crosstab html output

2006-03-01 06:37

Hi,

 

I have built a crosstab report. The HTML output produces some html tables and html cells.

In iReport I defined the cell height and width in the crosstab and also the height and width of the "textfield" displaying some data.

The "textfield" text is aligned horizontally and vertically in report design. But in the output only the horizontal align is visible, the text is always displayed at the top of the cell.

 

I got the following html code:

 

---- snip ----

<tr valign="top">

<td valign="middle" style="text-align: center;"><span style="font-family: Arial; font-size: 12.0px; font-weight: bold;">Total</span></td>

</tr>

---- snip ----

 

The html table cell ("Total") doesn't know its height itself.

If I add e.g. "height: 40px;" to the style tag of the <td> tag the text will be aligned vertically in the right way.

What should I do to achieve the alignment?

 

Thanks a lot.

 

 

 

 

By: Lucian Chirita - lucianc

RE: Alignment problem in crosstab html output

2006-03-01 07:56

Hi

 

We're trying to find the best solution for this problem.

 

In the meantime, maybe you can use the following workaround for the issue: the problem only occurs when the text field covers the whole crosstab cell width. Therefore, if you decrease by one the text field width (or decrease by two and set x=1 if you want to keep it perfectly centered), the vertical alignment will work (the exported will create an empty td having the height specified).

 

Regards,

Lucian

 

 

 

 

By: Lucian Chirita - lucianc

RE: Alignment problem in crosstab html output

2006-03-01 09:05

A fix has been commited on CVS. When the row does not contain a spacer element (which specifies a height), the height will be set to the <tr> element.

 

You can test the CVS version once the public CVS gets synchronized with the development one (make sure you get JRHtmlExporter.java rev 1.70).

 

Regards,

Lucian

 

 

 

 

By: Manuel Lamotte - gaco_warlock

RE: Alignment problem in crosstab html output

2006-03-01 23:32

Thanks a lot. I has already tested the first hint and it works.

 

Now I will try to test the fix by checking out the cvs.

 

Best Regards

Manuel

 

 

 

 

By: Manuel Lamotte - gaco_warlock

RE: Alignment problem in crosstab html output

2006-03-02 02:15

The CVS version is working fine, the alignment is perfectly :-)

 

Thank you.

Manuel

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...