Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-report-designer-dev] How can I fill a list-box with Birt Report Designer API ?

Hi,
I've got a little problem.
I'd like to create a report (.rptdesign file) with Birt API (without using
eclipse graphic tool).
I'd like to create a 'report parameter' which have a static list.
How can I add values to this static list ?

Here is an extract of my code :

public static void buildReportParameters(ElementFactory designFactory,
ReportDesignHandle designHandle){
		ScalarParameterHandle scalarParameterHandle =
designFactory.newScalarParameter("filtre_service");
		
		try {
		
scalarParameterHandle.setValueType(DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC);
		
scalarParameterHandle.setDataType(DesignChoiceConstants.PARAM_TYPE_STRING);
			scalarParameterHandle.setParamType("simple");
			scalarParameterHandle.setPromptText("Application");
		
scalarParameterHandle.setControlType(DesignChoiceConstants.PARAM_CONTROL_LIST_BOX);
			
			
			
			scalarParameterHandle.setDistinct(true);
			scalarParameterHandle.setCategory("Unformatted");
						
			designHandle.getParameters().add(scalarParameterHandle);
		} catch (SemanticException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
	}
Thanks.
flo

-- 
View this message in context: http://www.nabble.com/How-can-I-fill-a-list-box-with-Birt-Report-Designer-API---tp21326466p21326466.html
Sent from the Eclipse BIRT - Report Designer - Dev mailing list archive at Nabble.com.



Back to the top