My report design is entirely dynamic. The SQL gets generated in Java and a final SQL is pushed to the crystal rpt templated to display the result set. There are no fixed fields in the crystal report design template. So all the properties for the field are set in the JSP file. My code is :
------------------------------------------------Public method
FieldObject fieldObject = new FieldObject();
DBField field = (DBField)reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(0).getDataFields().findField(fieldName, FieldDisplayNameType.shortName, Locale.US);
fieldObject.setFieldValueType(field.getType());
fieldObject.setDataSourceName(field.getFormulaForm());
fieldObject.setLeft(Left+50);
fieldObject.setWidth (Width);
fieldObject.setHeight( Height);
fieldObject.setTop(Top);
reportClientDocument.getReportDefController().getReportObjectController().add(fieldObject, section, -1);
------------------------------------
The above code sets the field properties. I am trying to add a property so that my field object can expand to multiple lines if the data is too long. I dont see such a property in "FieldObject" class of crystal API's but i see one in "TextObject" class. If I use "TextObject" class, I cannot set the "setFieldValueType" as shown in the above method. Is there any class which includes both or is there a way to include this feature in "FieldObject" class.
Thanks,
Kiran