How to set property for JRDesignTextField item

0
JRDesignTextField textField = new JRDesignTextField();   
textField.setX(xPos);   
textField.setY(2);  
textField.setWidth(columnWidth);   
textField.setHeight(COLUMN_HEIGHT);   
textField.setHorizontalAlignment(HorizontalAlignEnum.LEFT);   
textField.setStyle(normalStyle);           
JRDesignPropertyExpression propertyExpression = new JRDesignPropertyExpression();     
JRDesignExpression expr = new JRDesignExpression();     
expr.setValueClass(java.lang.String.class);     
expr.setText(COL_HEADER_EXPR_PREFIX + i);     
propertyExpression.setName("net.sf.jasperreports.export.xls.column.name");     
propertyExpression.setValueExpression(expr);      
textField.addPropertyExpression(propertyExpression);   

I am building Jasper template on fly based on query given.

I want to set below property of that Detail Section Testfiled item,

"net.sf.jasperreports.export.xls.column.name" = "col1"

"net.sf.jasperreports.export.csv.column.name"="col1"

"net.sf.jasperreports.export.csv.repeat.value" = "true"
How to do this?

OR want ed to find what is happening behind the GUI of Ireport or jaspersoft when right click on filed and select csv metadata .....

vpatel@gwu.edu's picture
Joined: Sep 4 2014 - 7:50pm
Last seen: 5 months 3 days ago

0 Answers:

No answers yet
Feedback
randomness