Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: FieldObject class issue Post Reply Post New Topic
Author Message
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Topic: FieldObject class issue
    Posted: 16 Sep 2009 at 12:02pm

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
share your knowledge
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 16 Sep 2009 at 2:06pm
I figured it out.
share your knowledge
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.