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); }
SAP BusinessObjects http://www.sap.com/sapbusinessobjects/ Support services http://service.sap.com/bosap-support/ Product Documentation on the Web http://help.sap.com/ |