Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
May I have some advice on setting the style of a cell in Birt?
p.gonzales
<p>I am creating a report using the api's. I successfully created a report and exported it to excel, however there is no style, no font, or no color. I can't figure out how I would add these things to a CellHandle. I want to create the report dynamically so using a .rptDesignFile created using the gui report editor isn't an option. Could someone give me a suggestion, or a minimum example of adding a color to a font for the text located in a CellHandle.</p>
<p> </p>
<p>Right now I am viewing the API for these classes, supposedly I shouldn't access SharedStyleHandle directly. And a ReportDesignHandle is not useable in the constructor for the SharedStyleHandle anyway.</p>
<p> </p>
<p>DesignElementHandle</p>
<p><a data-ipb='nomediaparse' href='
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/CellHandle.html'>http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/CellHandle.html</a></p>
;
<p> </p>
<p>SharedStyleHandle</p>
<p><a data-ipb='nomediaparse' href='
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/SharedStyleHandle.html'>http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/SharedStyleHandle.html</a></p>
;
<p> </p>
<p>ModuleHandle</p>
<p><a data-ipb='nomediaparse' href='
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/ModuleHandle.html'>http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/ModuleHandle.html</a></p>
;
<p> </p>
<p>ReportDesignHandle</p>
<p><a data-ipb='nomediaparse' href='
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/CellHandle.html'>http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/CellHandle.html</a></p>
;
<p>
</p>
Find more posts tagged with
Comments
p.gonzales
<p>Now I am having another issue. I used</p>
<p> </p>
<p>CellHandle foo;</p>
<p>CellHandle foo1;</p>
<p> </p>
<p>StyleHandle sh = foo.getPrivateStyle();</p>
<p>ColorHandle bgColor = sh.getBackgroundColor();</p>
<p>bgColor.setRGB( 0xFF8888 );</p>
<p> </p>
<p>But this changed the color of all CellHandles foo, and foo1. So everything has a red background color, not just foo. Any suggestions?</p>
mwilliams
Sorry for the delay. Have you made any progress on this? Is there a simple example that I can run you could attach that shows what all you're doing so I can test on it? Thanks.