Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Unable to set width of column in PDF using ICellInstance class
Jyothy
Hi,
I need to generate a PDF report where the columns are dynamically generated. These columns are days of a month. In the PDF each of the column width is not rendered according to the data. I had done as follows which did not show required results.
I have created a class which implements ICellEventHandler ans onCreatesets the width in the following way
public void onCreate(ICellInstance arg0, IReportContext arg1) {
try {
arg0.setWidth("20px");
arg0.getStyle().setFontSize("16px");
} catch (Exception e) {
// TODO: handle exception
}
}
now while creating the dynamic cells i have used this class to set width as follows
CellHandle cell = (CellHandle) tabledetail.getCells().get(
(preDefinedColumnCount + i) - 1);
if(reportContext.getOutputFormat().equalsIgnoreCase("pdf"))
cell.setEventHandleClass("com.netenrich.msp.reports.events.CellInstance");
I could see the font changed as specified but could not change the column width.
Can anyway help me in changing the column width?
Thanks
Jyothy.
Find more posts tagged with
Comments
There are no comments yet