Home
Analytics
Column header labels don't stay centered after adjusting widths
rbguy
<p>Hello,</p><p> I'm pretty sure this is a bug with the software but I thought I would post here to see if by chance someone may know a solution. If I have a table with column headers that are comprised of merged cells. I put labels in these merged cells and center them. For some reason, when I readjust the column widths the column header labels become left justified, even though the center text button is still selected. I've tried removing the labels and re-adding them, but even though I specify center, they still show up left justified in the column. I've attached a sample report that shows the problem.</p><p>Thanks.</p>
Find more posts tagged with
Comments
GLO_FR
<p>Hi,</p><p> </p><p>just tested your design and I've no problem with BRDPro 3.7.2 and BIRT OS 4.3</p><p> </p><p>Are your using BIRT OS or commercial ? what version ?</p><p> </p><p>In your case, you can always have a look in the XML source, find the aligment and change it manually</p><pre class="_prettyXprint _lang-xml"> <cell id="9"> <property name="colSpan">2</property> <property name="rowSpan">1</property> <property name="borderBottomStyle">solid</property> <property name="borderBottomWidth">1px</property> <property name="borderLeftStyle">solid</property> <property name="borderLeftWidth">1px</property> <property name="borderRightStyle">solid</property> <property name="borderRightWidth">1px</property> <property name="borderTopStyle">solid</property> <property name="borderTopWidth">1px</property> <label id="31"> <property name="fontSize">10pt</property> <property name="borderBottomStyle">none</property> <property name="borderLeftStyle">none</property> <property name="borderRightStyle">none</property> <property name="borderTopStyle">none</property>-- Here ---> <property name="textAlign">center</property> <property name="whiteSpace">nowrap</property> <text-property name="text">Column Header for 1&2</text-property> </label> </cell></pre>
rbguy
<p>GLO_FR, thanks for your reply. I am using eclipse BIRT 4.3.1. I added manually the "<property name="textAlign">center</property>" tag exactly where you show it in your example above and I am still getting the text left justified.</p><p> </p><p> Do you have any other ideas as to why it is working for you and not for me.</p><p>Thanks again for your help!</p>
GLO_FR
<p>Hi,</p><p> </p><p>very strange.</p><p>do you have the possibility to upload your design with a sample datasource ?</p>
rbguy
<p>Hi again. For this design, I just used the out of the box datasource that came with Birt. (Classic Models Inc. SampleDB Driver)</p><p>Sorry for my ignorance, but I'm not quite sure how I would upload this datasource with my design.</p>
GLO_FR
<p>Hi,</p><p>I re-DL your design and I still have'nt any problem.</p><p>I'm using BIRT 4.3.0.</p><p> </p><p>I really don't know. Maybe try to re-install the pluggin.</p>
rbguy
<p>Thanks for the reply and suggestion. I reinstalled the plugin and used the 4.3.0 just like you and I am still seeing the left justified text. I'm attaching a screen shot that shows what I am seeing just to be sure it is different that what you are seeing.</p><p>Thanks again!</p><p>
</p>
kclark
<p>Instead of installing and uninstalling the plugin from your eclipse installation can you download the all-in-one package from eclipse.org/birt just to rule that out?</p>
rbguy
<p>Thanks kclark for the reply. I just now tried both the 430 and 431 all-in-one packages and I am getting the same behavior. I did notice something interesting, however. The column heading is not centered in preview mode and when I say Run-View Report->Web Viewer.</p><p>Out of curiousity, I tried View-Report->PDF and it is centered like it is supposed to. (Also Doc, and XLS).</p><p> </p><p>So I guess the question now is why Web Viewer doesn't center right as opposed to the other view methods?</p>
kclark
<p>I'm not sure why the web viewer isn't displaying it correctly. I do know that you'll see some funny behavior from the preview tab so I always recommend the web viewer instead. Usually you'll see the opposite behavior when going to PDF due to some features needing to be in separate run and render tasks. Have you tried this deployed to tomcat with the web viewer war yet or just in the web viewer in eclipse?</p>
rbguy
<p>Unfortunately, yes. I've deployed to my tomcat instance on the server with the web viewer war and it is doing the same thing by not centering the headers. I guess it's not a big deal since I know now I can just direct my users to export to PDF. I'm still curious as to why this is happening, however, I'm good with the "work around". Thank you so much for all of your help.</p><p> </p><p>