Tables tables = clientDoc.getDatabase().getTables(); IField firstField = tables.getTable(0).getDataFields().getField(0);
FieldObject fieldObject = new FieldObject(); fieldObject.setFieldValueType(firstField.getType()); fieldObject.setDataSource(firstField.getFormulaForm());
fieldObject.setLeft(1000);
ReportDefController reportDefController = clientDoc.getReportDefController(); ISection section = reportDefController.getReportDefinition().getPageHeaderArea().getSections().getSection(0);
reportDefController.getReportObjectController().add(fieldObject, section, 0);
void AddDatabaseField(ReportClientDocument clientDoc) { Tables tables = clientDoc.getDatabase().getTables(); IField firstField = tables.getTable(0).getDataFields().getField(0); FieldObject fieldObject = new FieldObject(); fieldObject.setFieldValueType(firstField.getType()); fieldObject.setDataSource(firstField.getFormulaForm()); fieldObject.setLeft(1000); ReportDefController reportDefController = clientDoc.getReportDefController(); ISection section = reportDefController.getReportDefinition().getPageHeaderArea().getSections().getSection(0); reportDefController.getReportObjectController().add(fieldObject, section, 0); }
Business Objects, an SAP company http://www.businessobjects.com/ Support services http://www.businessobjects.com/services/support/ Product Documentation on the Web http://support.businessobjects.com/documentation/ |