当前位置: 首页>>代码示例>>Java>>正文


Java RenderOption.setOutputFormat方法代码示例

本文整理汇总了Java中org.eclipse.birt.report.engine.api.RenderOption.setOutputFormat方法的典型用法代码示例。如果您正苦于以下问题:Java RenderOption.setOutputFormat方法的具体用法?Java RenderOption.setOutputFormat怎么用?Java RenderOption.setOutputFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.birt.report.engine.api.RenderOption的用法示例。


在下文中一共展示了RenderOption.setOutputFormat方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toPPTX

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
protected void toPPTX( IReportEngine engine, String reportDocument,
		String pptx ) throws EngineException
{
	IReportDocument document = engine.openReportDocument( reportDocument );
	try
	{
		IRenderTask task = engine.createRenderTask( document );
		try
		{
			RenderOption option = new RenderOption( );
			option.setOutputFormat( "pptx" );
			option.setOutputFileName( pptx );
			task.setRenderOption( option );
			task.render( );;
		}
		finally
		{
			task.close( );
		}
	}
	finally
	{
		document.close( );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:26,代码来源:DesignToPNG.java

示例2: buildRenderOptions

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
@Override
protected RenderOption buildRenderOptions(HttpServletRequest request, HttpServletResponse response) throws IOException {
    RenderOption opts = new PDFRenderOption();
    opts.setOutputFormat("PDF");
    opts.setOutputStream(response.getOutputStream());
    return opts;
}
 
开发者ID:kewne,项目名称:spring-birt,代码行数:8,代码来源:PdfBirtReportView.java

示例3: runandrender_emitter

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
/**
 * @param format
 *            render format
 * @param pagination
 *            For html output only, decide whether generate report with page
 *            break or not.
 * @throws EngineException
 */
protected ArrayList runandrender_emitter( String format, boolean pagination )
		throws EngineException
{
	IReportRunnable reportRunnable = engine.openReportDesign( inPath
			+ getReportName( ) );
	IRunAndRenderTask task = engine.createRunAndRenderTask( reportRunnable );
	RenderOption options = new HTMLRenderOption( );
	options.setOutputFormat( format );
	if ( format.equals( EMITTER_HTML ) )
	{
		( (HTMLRenderOption) options ).setHtmlPagination( pagination );
	}
	HashMap appContext = new HashMap( );
	appContext.put( "emitter_class", this );
	task.setAppContext( appContext );
	task.setRenderOption( options );
	task.run( );
	ArrayList errors = (ArrayList) task.getErrors( );
	task.close( );
	return errors;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:30,代码来源:BaseEmitter.java

示例4: runandthenrender_emitter

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
protected ArrayList runandthenrender_emitter( String format )
		throws EngineException
{
	ArrayList errors = new ArrayList( );
	this.run( getReportName( ) + ".rptdesign", getReportName( )
			+ ".rptdocument" );
	IReportDocument document = engine.openReportDocument( outPath
			+ getReportName( ) + ".rptdocument" );
	IRenderTask task = engine.createRenderTask( document );
	RenderOption options = new HTMLRenderOption( );
	options.setOutputFormat( format );
	HashMap appContext = new HashMap( );
	appContext.put( "emitter_class", this );
	task.setAppContext( appContext );
	task.setRenderOption( options );
	task.render( );
	errors = (ArrayList) task.getErrors( );
	task.close( );
	return errors;

}
 
开发者ID:eclipse,项目名称:birt,代码行数:22,代码来源:BaseEmitter.java

示例5: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "postscript" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:PostscriptEmitterDescriptor.java

示例6: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "docx" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:DocxEmitterDescriptor.java

示例7: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "odt" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:OdtEmitterDescriptor.java

示例8: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "doc" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:WordEmitterDescriptor.java

示例9: prepareRenderOptions

import org.eclipse.birt.report.engine.api.RenderOption; //导入方法依赖的package包/类
protected RenderOption prepareRenderOptions(String outputFormat, FileOutputStream outputStream) {
	RenderOption renderOptions = new RenderOption();
	renderOptions.setOutputFormat( outputFormat );
	if( outputStream != null ) {
		renderOptions.setOutputStream( outputStream );
	}
	if( debug ) {
		renderOptions.setOption( "ExcelEmitter.DEBUG", Boolean.TRUE);
		debug = false;
	}
	if( ! removeEmptyRows ) {
		renderOptions.setOption( "ExcelEmitter.RemoveBlankRows", Boolean.FALSE );
	}
	if( htmlPagination ) {
		renderOptions.setOption( HTMLRenderOption.HTML_PAGINATION, Boolean.TRUE );
	}
	if( autoFilter ) {
		renderOptions.setOption( ExcelEmitter.AUTO_FILTER, Boolean.TRUE );
	}
	if( singleSheet ) {
		renderOptions.setOption( "ExcelEmitter.SingleSheet", true );
	}
	if( singleSheetWithPagination ) {
		renderOptions.setOption( ExcelEmitter.SINGLE_SHEET_PAGE_BREAKS, true );
	}
	if( nestTableInLastCell ) {
		renderOptions.setOption( ExcelEmitter.NEST_TABLE_IN_LAST_CELL, true );
	}
	if( displayFormulas != null ) {
		renderOptions.setOption( "ExcelEmitter.DisplayFormulas", displayFormulas );
	}
	if( displayGridlines != null ) {
		renderOptions.setOption( "ExcelEmitter.DisplayGridlines", displayGridlines );
	}
	if( displayRowColHeadings != null ) {
		renderOptions.setOption( "ExcelEmitter.DisplayRowColHeadings", displayRowColHeadings );
	}
	if( displayZeros != null ) {
		renderOptions.setOption( "ExcelEmitter.DisplayZeros", displayZeros );
	}
	if( disableGrouping != null ) {
		renderOptions.setOption( ExcelEmitter.DISABLE_GROUPING, disableGrouping );
	}
	if( structuredHeader != null ) {
		renderOptions.setOption( ExcelEmitter.STRUCTURED_HEADER, structuredHeader );
	}
	if( groupSummaryHeader != null ) {
		renderOptions.setOption( ExcelEmitter.GROUP_SUMMARY_HEADER, groupSummaryHeader );
	}
	if( blankLineAfterTopLevelTable ) {
		renderOptions.setOption( ExcelEmitter.BLANK_ROW_AFTER_TOP_LEVEL_TABLE, true );
	}
	if( spannedRowHeight != null ) {
		renderOptions.setOption( ExcelEmitter.SPANNED_ROW_HEIGHT, spannedRowHeight );			
	}
	if( templateFile != null ) {
		renderOptions.setOption( ExcelEmitter.TEMPLATE_FILE, templateFile );
	}
	
	return renderOptions;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:62,代码来源:ReportRunner.java


注:本文中的org.eclipse.birt.report.engine.api.RenderOption.setOutputFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。